{"id":25720033,"url":"https://github.com/gregwhitaker/rsocket-replayprocessor-example","last_synced_at":"2026-05-13T08:32:01.552Z","repository":{"id":82732628,"uuid":"234407199","full_name":"gregwhitaker/rsocket-replayprocessor-example","owner":"gregwhitaker","description":"Example of storing and replaying messages when a subscriber connects with Reactor and RSocket","archived":false,"fork":false,"pushed_at":"2020-12-04T22:24:26.000Z","size":76,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T17:41:26.064Z","etag":null,"topics":["project-reactor","reactive","reactive-programming","reactive-streams","rsocket","rsocket-java"],"latest_commit_sha":null,"homepage":"","language":"Java","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/gregwhitaker.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-16T20:37:37.000Z","updated_at":"2020-12-04T22:24:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"668739f8-1479-456b-9c25-bd3e9cc6225e","html_url":"https://github.com/gregwhitaker/rsocket-replayprocessor-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gregwhitaker/rsocket-replayprocessor-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Frsocket-replayprocessor-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Frsocket-replayprocessor-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Frsocket-replayprocessor-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Frsocket-replayprocessor-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregwhitaker","download_url":"https://codeload.github.com/gregwhitaker/rsocket-replayprocessor-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregwhitaker%2Frsocket-replayprocessor-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32974561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T06:31:55.726Z","status":"ssl_error","status_checked_at":"2026-05-13T06:31:51.336Z","response_time":115,"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":["project-reactor","reactive","reactive-programming","reactive-streams","rsocket","rsocket-java"],"created_at":"2025-02-25T17:36:25.192Z","updated_at":"2026-05-13T08:32:01.546Z","avatar_url":"https://github.com/gregwhitaker.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rsocket-replayprocessor-example\n![Build](https://github.com/gregwhitaker/rsocket-replayprocessor-example/workflows/Build/badge.svg)\n\nAn example of storing and replaying messages when a new subscriber connects using [Project Reactor](https://projectreactor.io/) and [RSocket](http://rsocket.io).\n\nIn this example, the `count-service` is generating a stream of numbers from `1` to `100` at a one second interval. When a `count-client` connects it\nrequests a stream of the numbers. A `ReplayProcessor` handles catching the client up by replaying all previously generated numbers before it connected.\n\n## Building the Example\nRun the following command to build the example:\n\n    ./gradlew clean build\n    \n## Running the Example\nFollow the steps below to run the example:\n\n1. Run the following command to start the `count-service`:\n\n        ./gradlew :count-service:run\n        \n2. In a new terminal, run the following command to start the `count-client`:\n\n        ./gradlew :count-client:run\n        \n    Notice how you receive a flurry of numbers when the subscriber connects starting at `1` up to the current count. Once you are all caught up\n    with the current count you start receiving a new number every one second. This is the `ReplayProcessor` making sure that a subscriber does\n    not miss a published message.\n    \n        \u003e Task :count-client:run\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 1\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 2\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 3\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 4\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 5\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 6\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 7\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 8\n\n3. In a new terminal, run the following command to start another `count-client`:\n\n        ./gradlew :count-client:run\n        \n    Notice how this client instance is streamed all of the published numbers as well until it is caught up.\n    \n4. Now, let the count reach `100` where the request will then complete.\n\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 99\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Received: 100\n        [reactor-tcp-nio-1] INFO example.count.client.CountClient - Done\n\n5. Once the request has completed start a new `count-client` by again running the following command:\n\n        ./gradlew :count-client:run\n        \n    Notice that you did not have to wait for the numbers to arrive in one second intervals, you were just immediately streamed all\n    one hundred messages. This is because the ReplayProcessor has stored the generated stream and simply replays it back to you.\n    \n## Bugs and Feedback\nFor bugs, questions, and discussions please use the [Github Issues](https://github.com/gregwhitaker/rsocket-replayprocessor-example/issues).\n\n## License\nMIT License\n\nCopyright (c) 2020 Greg Whitaker\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwhitaker%2Frsocket-replayprocessor-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregwhitaker%2Frsocket-replayprocessor-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregwhitaker%2Frsocket-replayprocessor-example/lists"}