{"id":18017001,"url":"https://github.com/fabmax/pubsub","last_synced_at":"2025-10-13T22:43:20.031Z","repository":{"id":28016423,"uuid":"31511244","full_name":"fabmax/pubsub","owner":"fabmax","description":"(Yet another) publish/subscribe network library for Java","archived":false,"fork":false,"pushed_at":"2016-12-04T19:24:39.000Z","size":146,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-14T14:54:35.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","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/fabmax.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-03-01T21:21:34.000Z","updated_at":"2021-09-27T19:51:20.000Z","dependencies_parsed_at":"2022-09-04T09:01:16.486Z","dependency_job_id":null,"html_url":"https://github.com/fabmax/pubsub","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fabmax/pubsub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Fpubsub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Fpubsub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Fpubsub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Fpubsub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabmax","download_url":"https://codeload.github.com/fabmax/pubsub/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabmax%2Fpubsub/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017141,"owners_count":26085984,"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-13T02:00:06.723Z","response_time":61,"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":"2024-10-30T04:19:52.935Z","updated_at":"2025-10-13T22:43:20.012Z","avatar_url":"https://github.com/fabmax.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"#PubSub\n\n(Yet another) light-weight publish/subscribe network library written in Java.\n\nCommunication is organized by one server node and an arbitrary number of client nodes.\nNodes register channels and publish messages in these channels. All nodes registered to\na particular channel receive the messages published in it.\n\n##Features:\n* Messages can be broadcasted as well as being sent to a specific client\n* Auto-discovery of server nodes using dns-sd / zeroconf\n* Auto-nodes which can act as server or client, as required\n* Clients automatically recover from server connection loss\n* Two message de-/serialization codecs:\n  * Google protocol buffers based for fast and bandwith efficient message serialization\n  * JSON for easy debugging\n* Messages can have an arbitrary number of data arguments\n* Message can be directly mapped to handler methods using annotations, enabling some sort of RPC operation\n\n##Hello world example:\n```java\n// create a server and a client node\nNode server = new ServerNode();\nNode client = new ClientNode(\"localhost\");\n\nserver.open();\nclient.open();\n\n// register the same channel on server and client\nChannel clientChannel = client.openChannel(\"test\");\nChannel serverChannel = server.openChannel(\"test\");\n\n// add channel listeners to receive messages on client and server side\nclientChannel.addMessageListener(new MessageListener() {\n    @Override\n    public void onMessageReceived(Message message) {\n        Logger.info(\"Client received message: [\" + message.getChannelId() + \":\" +\n                message.getTopic() + \"]:  \" + message.getData().getString(\"string\"));\n    }\n});\nserverChannel.addMessageListener(new MessageListener() {\n    @Override\n    public void onMessageReceived(Message message) {\n        Logger.info(\"Server received message: [\" + message.getChannelId() + \":\" +\n                message.getTopic() + \"]:  \" + message.getData().getString(\"string\"));\n    }\n});\n\n// wait a little while connection is negotiated\nThread.sleep(500);\n\n// send a messsage with some data from client to server\nBundle clientData = new Bundle();\nclientData.putString(\"string\", \"Hello World from client\");\nclientChannel.publish(new Message(\"hot stuff\", clientData));\n\n// send a messsage with some data from server to client\nBundle serverData = new Bundle();\nserverData.putString(\"string\", \"Hello World from server\");\nserverChannel.publish(new Message(\"hot stuff\", serverData));\n\n// wait a little until messages are processed\nThread.sleep(500);\n\n// close server and client\nclient.close();\nserver.close();\n```\n\n##License:\n```\nCopyright 2015 Max Thiele\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabmax%2Fpubsub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabmax%2Fpubsub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabmax%2Fpubsub/lists"}