{"id":31643940,"url":"https://github.com/att/vertx-eventbus","last_synced_at":"2025-10-07T04:07:49.637Z","repository":{"id":33306648,"uuid":"36951385","full_name":"att/vertx-eventbus","owner":"att","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-07T01:41:38.000Z","size":136,"stargazers_count":4,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-04-21T12:21:05.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/att.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":"2015-06-05T19:29:44.000Z","updated_at":"2023-02-11T19:44:46.000Z","dependencies_parsed_at":"2022-08-24T15:11:38.685Z","dependency_job_id":null,"html_url":"https://github.com/att/vertx-eventbus","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/att/vertx-eventbus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/att%2Fvertx-eventbus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/att%2Fvertx-eventbus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/att%2Fvertx-eventbus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/att%2Fvertx-eventbus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/att","download_url":"https://codeload.github.com/att/vertx-eventbus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/att%2Fvertx-eventbus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278717428,"owners_count":26033542,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-10-07T04:03:30.969Z","updated_at":"2025-10-07T04:07:49.627Z","avatar_url":"https://github.com/att.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"vertx-eventbus\n==============\n\nThis is a Node.js Module that manages the vert.x SockJS event bus bridge for a node application. This is a lightweight version that has minimal dependencies. Based of an existing open source vert.x eventbus bridge client node module:\n\nhttps://github.com/muraken720/vertx-eventbus-client\n\nHowever, that module was dependent on some unnecessary modules (JSDOM) and another sockJS module that required a C++ compiler during installation (ws and thus contextify). Some of these modules were not compatible with the latest version of node (\u003e 0.10) and thus would not install locally on Windows machines and on the occassional Macbook pro. Developers were wasting too much time configuring their individual development machine to build and debug a node application and were forced to use a VM running linux.\n\nThus, I re-wrote the module to utilize another sockjs module:\n\nhttps://github.com/humanchimp/node-sockjs-client\n\nThis reduced the dependency modules without losing any functionality. I did re-name a few things (i.e. CONNECTED instead of OPEN).\n\n###Installation\n\nIts a node module so refer to the latest node documentation for installation. You could simply add the following to you're package.json:\n\n```json\n  \"dependencies\": {\n    \"vertx-eventbus\" : \"git+https://github.com/att/vertx-eventbus\"\n  }\n```\n\n###Initialization\n\nCreate an instance of the event bus:\n\n```\nvar vertx = require('vertx-eventbus');\nvar eventbus = new vertx.EventBus('http://localhost:8080/eventbus');\n```\n\n###API\n\n####send\n\n```\nsend(address, message, replyHandler)\n```\n\n* address - vert.x event bus address you want the message to be sent to\n* message - the message itself.\n* replyHandler (optional) - an optional reply handler to call with the message reply\n\n####publish\n\n```\npublish(address, message)\n```\n\n* address - vert.x event bus address you want the message to be published to\n* message - the message itself.\n\n####registerHandler\n\n```\nregisterHandler(address, handler)\n```\n\nRegister's a handler for a specific address.\n\n* address - the vert.x event bus address you want to receive messages\n* handler - the handler that is called when a message is sent or published to you're address\n\n####unregisterHandler\n\n```\nunregisterHandler(address, handler)\n```\n\nUNRegister's a handler for a specific address.\n\n* address - the vert.x event bus address that was registered to receive messages\n* handler - the associated handler that was registered with\n\n####status\n\n```\nstatus()\n```\n\nReturns the current status of the connection:\n\n* CONNECTING\n* CONNECTED\n* CLOSING\n* CLOSED\n\n###Callbacks\n\n####onopen\n\nThis is called when SockJS has successfully connected to the vert.x eventbus bridge.\n\n####onclose\n\nThis is called when SockJS has closed the connection to the vert.x eventbus bridge. Expect this to happen even with ping'ing occuring.\n\n###TEST\n\n####Server side test code\nYou need an installation of vertx.io on you're local machine to start the server side test code.\n\nvertx run test/Server.java\n\n####Client side test code\nYou need node.js installed on you're local machine to run the client side test code.\n\nnode test/node-client.js\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatt%2Fvertx-eventbus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatt%2Fvertx-eventbus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatt%2Fvertx-eventbus/lists"}