{"id":48680747,"url":"https://github.com/agourlay/omnibus","last_synced_at":"2026-04-26T20:00:44.243Z","repository":{"id":64767452,"uuid":"14859435","full_name":"agourlay/omnibus","owner":"agourlay","description":"An HTTP-friendly persistent message bus.","archived":true,"fork":false,"pushed_at":"2015-08-22T07:38:10.000Z","size":4569,"stargazers_count":70,"open_issues_count":5,"forks_count":4,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-05-01T19:37:51.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","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/agourlay.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":"2013-12-02T10:29:42.000Z","updated_at":"2023-07-08T14:18:08.000Z","dependencies_parsed_at":"2022-12-16T02:11:37.131Z","dependency_job_id":null,"html_url":"https://github.com/agourlay/omnibus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/agourlay/omnibus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agourlay%2Fomnibus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agourlay%2Fomnibus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agourlay%2Fomnibus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agourlay%2Fomnibus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agourlay","download_url":"https://codeload.github.com/agourlay/omnibus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agourlay%2Fomnibus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32310804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-04-11T01:00:36.060Z","updated_at":"2026-04-26T20:00:44.230Z","avatar_url":"https://github.com/agourlay.png","language":"Scala","funding_links":[],"categories":["进程间通信"],"sub_categories":["Spring Cloud框架"],"readme":"Omnibus  [![Build Status](https://travis-ci.org/agourlay/omnibus.png?branch=master)](https://travis-ci.org/agourlay/omnibus)\n=========\n\nOmnibus is an HTTP-friendly persistent message bus which means :\n\n- Topic hierarchies and subscriptions are managed via a rest API.\n- Updates are streamed by WebSocket or Server-Sent-Event.\n- With reactive modes it is possible to replay specific parts of the events.\n- Subscriptions can be composed via the URL keyword +.\n- Most of the features can be accessed via the administration web interface.\n- Events are persisted on the file system.\n\n## Status\n\nOmnibus is in **alpha** stage. It is under active development. Breaking changes could occur at any moment.\n\nStill reading after this disclaimer? Let's start!\n\n## Getting started\n\nGet the latest [omnibus.tar](https://github.com/agourlay/omnibus/releases) distribution, extract and run the starting script in `/bin`.\n\nThis starts Omnibus on default port 8080 for HTTP and port 8081 for WebSockets.\n\nYou can configure the system by changing the properties in `/conf/application.conf`.\n\n```\nomnibus {\n    http {\n        port = 8080\n    }\n    websocket {\n        port = 8081\n        enable = true\n    }\n    admin {\n        userName = \"admin\"\n        password = \"omnibus\"\n    }\n    topic {\n        retentionTime = \"3 days\"\n    }\n    graphite {\n        enable = false\n        host = \"graphite.example.com\"\n        port = 2003\n        prefix = \"omnibus\"\n    }\n}\n```\n\nThe system is running, now let's explore the API.\n \n## REST \u0026 hal+json\n\nOmnibus follows the specification [hal+json](http://stateless.co/hal_specification.html) to expose its resources. \n\nIt simply means that the REST API is easily discoverable.\n\nLet's demonstrate how it works with some basic commands using CURL.\n\nTopics are trees, you can create them simply with a POST request.\n\nThe root URL of every topic is `/topics`.\n\n\u003e curl -X GET http://localhost:8080/topics\n\n```json\n[]\n```\n\nWe receive the empty collection of roots.\n\nUse POST to create the nested topic `/topics/animals/furry`.\n\n\u003e curl -X POST http://localhost:8080/topics/animals/furry\n\nWe can now retrieve informations about the topic we just created using GET\n\n\u003e curl -X GET http://localhost:8080/topics/animals\n\n```json\n{\n  \"topic\": [\"animals\"],\n  \"subTopicsNumber\": 1,\n  \"subscribersNumber\": 0,\n  \"eventsNumber\": 0,\n  \"creationDate\" : 1390212312,\n  \"viewDate\": 1390212364,\n  \"_embedded\": {\n    \"children\": [\n      { \"furry\": { \"href\": \"/topics/animals/furry\" }}\n    ]\n  },\n  \"_links\": [\n    { \"self\": { \"href\": \"/topics/animals\" }},\n    { \"subscribe\": { \"href\": \"/streams/topics/animals\" }},\n    { \"stats\": { \"href\": \"/stats/topics/animals\" }}\n  ]\n}\n``` \n\nYou get there almost all the information you need to interact with a topic in a REST fashion way.\n\nWith PUT you can push data to an existing topic.\n\n\u003e curl -X PUT http://localhost:8080/topics/animals -d \"dolphins are the best\"\n\nIf you publish a message at the `/animals` level, all subtopics will receive it as well.\n\nIt is possible to DELETE a topic and all its subtopics via the [administration](https://github.com/agourlay/omnibus#administration) API. \n\nYou can also request the collection of leaves topic using `GET /leaves`. It is a streamed API, so you will receive topics as the topic trees are traversed. \n\n\u003e curl -X GET http://localhost:8080/leaves\n\n\u003e ~~\u003e Streaming topic view \n\nAnd finally you can of course subscribe to the notifications on a topic via WebSockets or SSE.\nThe URL are identical except the port and the protocol : \n\u003e ws://localhost:8081/streams/topics/animals\nor\n\u003e http://localhost:8080/streams/topics/animals\n\n\n## Subscription models\n\nOmnibus follows the common subscription model used in similar systems :\n\n- when subscribing to a `parent` topic, one will see all updates occurring in the subtopics as well.\n- when subscribing to a `leaf` topic, one will only see the updates targeting this topic directly.\n\n## Reactive modes\n\nOmnibus supports reactive modes via URL parameters in order to replay specific sequence of events from topics.\n\nThe supported modes are: \n\n- `simple`   : classic subscription (default one if not specified)\n\n- `replay`   : get all past messages on topic and the following events\n  - e.g http://localhost:8080/streams/topics/customer/order?react=replay\n  - e.g ws://localhost:8081/streams/topics/customer/order?react=replay\n\n- `since-id` : all the past events since a given event-id and the following events\n  - e.g http://localhost:8080/streams/topics/worldcup?react=since-id\u0026since=120\n  - e.g ws://localhost:8081/streams/topics/worldcup?react=since-id\u0026since=120\n\n- `since-ts` : all the past events since a given unix timestamp and the following events\n  - e.g  http://localhost:8080/streams/topics/logs?react=since-ts\u0026since=1388250283\n  - e.g  ws://localhost:8081/streams/topics/logs?react=since-ts\u0026since=1388250283\n\n- `between-id` : all the events between two given event-id \n  - e.g http://localhost:8080/streams/topics/worldcup?react=between-id\u0026since=12\u0026to=200\n  - e.g ws://localhost:8081/streams/topics/worldcup?react=between-id\u0026since=12\u0026to=200\n\n- `between-ts` : all the events between two given unix timestamp\n  - e.g  http://localhost:8080/streams/topics/logs?react=between-ts\u0026since=1388250283\u0026to=1388250552\n  - e.g  ws://localhost:8081/streams/topics/logs?react=between-ts\u0026since=1388250283\u0026to=1388250552\n\n\u003e curl -X GET \"http://localhost:8080/streams/topics/results/basketball?react=between-id\u0026since=1\u0026to=2\"\n\n\u003e ~~\u003e Streaming subscription for topics /results/basketball with mode replay\n\n\u003e id: 1\n\u003e event: /result/basketball\n\u003e data: A basket ball game result\n\u003e timestamp: 1388250283\n\n\u003e id: 2\n\u003e event: /result/basketball\n\u003e data: Another basket ball game result\n\u003e timestamp: 1388250552\n\n## Composable subscriptions\n\nYou can compose subscriptions with the char `+` in order to merge notifications from multiple topics.\n\n\u003e curl -X GET http://localhost:8080/streams/topics/customer/order/+/logistic/export\n\n\u003e ~~\u003e Streaming subscription for topics /customer/order + /logistic/export with mode simple\n\nAll the topics must exist at the moment of the subscription or the whole request will be rejected.\n\nOf course you are can use reactive modes on composed subscriptions but be ready to handle the flow of data if you target a root topic with the replay mode.\n\n## Persistence\n\nOmnibus persists the events on the local file-system in order to be able to replay them later if needed. \n\nYou can find the your data in the 'data' folder, you can delete the content manually for a rapid maintenance clean up.\n\n## Administration\n\nAll administration features are protected by HTTP basic authentication. (better than nothing for now)\n\nBy default the admin credentials are `admin/omnibus`, this can be changed in the configuration file.\n\nThe administration module exposes 3 API :\n\n- `DELETE /admin/topics/{topic-name}` to delete a topic and its subtopics\n\n- `GET /admin/subscribers` get all subscriptions\n\n- `DELETE /admin/subscribers/{subscriber-id}` kill a subscription\n\nYou can also use the administration web interface running on http://localhost:8080/ to manually access most of the API and statistics.\n\n![screenshot](https://github.com/agourlay/omnibus/raw/master/docs/screenshot.png)\n\nAnd here some real-time stats about a topic\n\n![screenshot](https://github.com/agourlay/omnibus/raw/master/docs/load.png)\n\n## Monitoring\n\nOmnibus can be configured to report its usage statistics to a Graphite instance.\n\n```\ngraphite {\n  enable = false\n  host = \"graphite.example.com:2003\"\n}\n```\n\nIf you don't want to use Graphite, you can query manually statistics concerning all topics following two modes.\n\n- `live` : get the current statistics. (default mode)\n  - e.g  http://localhost:8080/stats/topics/animals/furry/\n\n- `streaming` : continuous data stream of statistics in real-time\n  - e.g  http://localhost:8080/stats/topics/animals/furry?mode=streaming\n\n## Build and contribute\n\nBuild the project with SBT, I personally like `~re-start` to restart the application automatically when a file system change occurs.\n\nIf you want to build the frontend, you need [Bower](http://bower.io/) and [Grunt](http://gruntjs.com/) for Javascript build management.\n\nThen in the folder `src/main/resources/frontend` run the following commands\n\n\u003enpm install\n\n\u003ebower install\n\n\u003egrunt\n\nThen you are good to go!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagourlay%2Fomnibus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagourlay%2Fomnibus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagourlay%2Fomnibus/lists"}