{"id":13807485,"url":"https://github.com/jponge/vertx-go-tcp-eventbus-bridge","last_synced_at":"2025-07-11T12:39:48.835Z","repository":{"id":57525831,"uuid":"53195986","full_name":"jponge/vertx-go-tcp-eventbus-bridge","owner":"jponge","description":"A Go Client for the Eclipse Vert.x TCP EventBus Bridge","archived":false,"fork":false,"pushed_at":"2018-03-15T15:59:16.000Z","size":69,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-20T22:24:40.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jponge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-05T10:30:30.000Z","updated_at":"2024-04-03T11:35:07.000Z","dependencies_parsed_at":"2022-08-29T00:31:31.000Z","dependency_job_id":null,"html_url":"https://github.com/jponge/vertx-go-tcp-eventbus-bridge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jponge%2Fvertx-go-tcp-eventbus-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jponge%2Fvertx-go-tcp-eventbus-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jponge%2Fvertx-go-tcp-eventbus-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jponge%2Fvertx-go-tcp-eventbus-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jponge","download_url":"https://codeload.github.com/jponge/vertx-go-tcp-eventbus-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250355299,"owners_count":21416884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T01:01:25.976Z","updated_at":"2025-04-23T02:23:24.748Z","avatar_url":"https://github.com/jponge.png","language":"Go","funding_links":[],"categories":["Vert.x Event Bus Clients"],"sub_categories":[],"readme":"# A Go Client for the Eclipse Vert.x TCP EventBus Bridge\n\nThis project is a client API for interacting with\n[Eclipse Vert.x](http://vertx.io/) applications from Go applications using the\n[TCP EventBus bridge](http://vertx.io/docs/vertx-tcp-eventbus-bridge/java/) from _Vert.x_.\n\n## Usage\n\nYou will need the following `import`:\n\n```go\nimport (\n  // ...\n  \"github.com/jponge/vertx-go-tcp-eventbus-bridge/eventbus\"\n  // ...\n)\n```\n\nand `go get github.com/jponge/vertx-go-tcp-eventbus-bridge/eventbus`\n\nThe `eventbus` package essentially provides 2 types:\n\n1. `eventbus.EventBus` that encapsulates the TCP bridge protocol, and\n2. `eventbus.Dispatcher` that helps receiving messages from the event bus, and dispatch them to\n   Go channels.\n\nHere is an (incomplete) snippet showing the usage of these 2 types:\n\n```go\n// Get an event bus connection\neventBus, err := eventbus.NewEventBus(\"localhost:7000\")\nif err != nil {\n  log.Fatal(\"Connection to the Vert.x bridge failed: \", err)\n}\n\n// Get a dispatcher for incoming messages\ndispatcher := eventbus.NewDispatcher(eventBus)\ndispatcher.Start()\n\n// Get a queue of length 8 for the messages on 'sample.clock.ticks'\nticks, id, err := dispatcher.Register(\"sample.clock.ticks\", 8)\nif err != nil {\n  log.Fatal(\"Registration on sample.clock.ticks failed: \", err)\n}\nlog.Println(\"sample.clock.ticks channel registered with ID=\", id)\n\n// Print all ticks from a goroutine\ngo func() {\n  for {\n    \u003c-ticks\n    log.Println(\"[tick]\")\n  }\n}()\n\n// Post messages to 'sample.echo', and expect replies on 'sample.echo.reply'\ngo func() {\n  for {\n    \u003c-time.After(time.Second * 3)\n    eventBus.SendWithReplyAddress(\"sample.echo\", \"sample.echo.reply\", nil, map[string]string{\n      \"source\": \"Go Client\",\n      \"what\": \"A tick!\",\n    })\n  }\n}()\n\n// Get replies on 'sample.echo.reply'\ngo func() {\n  for reply := range(echoReply) {\n    log.Println(\"Echo, got back: \", reply)\n  }\n}()\n```\n\n## Documentation\n\nYou should read the API documentation to understand all operations, and especially the concurrency\nassumptions and requirements:\n[https://godoc.org/github.com/jponge/vertx-go-tcp-eventbus-bridge/eventbus](https://godoc.org/github.com/jponge/vertx-go-tcp-eventbus-bridge/eventbus)\n\nA sample Vert.x / Java application is given in [vertx-sample-app/](vertx-sample-app/).\n\nIt can be used to run against the sample Go client from\n[sample-vertx-go-client/](sample-vertx-go-client/).\n\nFinally, the integration tests in [eventbus/integration-test/](eventbus/integration-test/) can be\nrun using `go test` in that folder, and the Vert.x / Java application above needs to be running.\n\n## License\n\n    Copyright 2016 Julien Ponge\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n        http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjponge%2Fvertx-go-tcp-eventbus-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjponge%2Fvertx-go-tcp-eventbus-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjponge%2Fvertx-go-tcp-eventbus-bridge/lists"}