{"id":40003657,"url":"https://github.com/vpavic/samples-spring-sse-redis","last_synced_at":"2026-01-19T02:03:27.586Z","repository":{"id":38330713,"uuid":"433609243","full_name":"vpavic/samples-spring-sse-redis","owner":"vpavic","description":"Samples: Spring Server-Sent Events with Redis","archived":false,"fork":false,"pushed_at":"2024-04-29T23:00:06.000Z","size":291,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-30T23:51:11.127Z","etag":null,"topics":["java","redis","samples","server-sent-events","spring-boot","spring-data-redis","spring-framework"],"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/vpavic.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2021-11-30T22:41:34.000Z","updated_at":"2024-04-05T03:14:23.000Z","dependencies_parsed_at":"2023-02-12T00:45:26.157Z","dependency_job_id":"396642fe-1019-4ec4-9a8f-843af7a8f40c","html_url":"https://github.com/vpavic/samples-spring-sse-redis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vpavic/samples-spring-sse-redis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavic%2Fsamples-spring-sse-redis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavic%2Fsamples-spring-sse-redis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavic%2Fsamples-spring-sse-redis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavic%2Fsamples-spring-sse-redis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vpavic","download_url":"https://codeload.github.com/vpavic/samples-spring-sse-redis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vpavic%2Fsamples-spring-sse-redis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28557784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"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":["java","redis","samples","server-sent-events","spring-boot","spring-data-redis","spring-framework"],"created_at":"2026-01-19T02:03:04.687Z","updated_at":"2026-01-19T02:03:27.579Z","avatar_url":"https://github.com/vpavic.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Samples: Spring Server-Sent Events with Redis\n\nimage:https://github.com/vpavic/samples-spring-sse-redis/actions/workflows/build.yml/badge.svg[\"Build\", link=\"https://github.com/vpavic/samples-spring-sse-redis/actions/workflows/build.yml\"]\n\nThis repository contains sample applications that showcase Spring Framework's support for https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events[server-sent events] backed by https://redis.io/topics/pubsub[Redis Pub/Sub].\n\nThe name of each sample application tells the web stack it's based on, and optionally the data access paradigm it uses to interact with Redis:\n\n* `sample-mvc-imperative`: Spring MVC Sample with Imperative Spring Data Redis\n* `sample-mvc-reactive`: Spring MVC Sample with Reactive Spring Data Redis\n* `sample-webflux`: Spring WebFlux Sample (with Reactive Spring Data Redis)\n\n== Getting Started\n\n=== Requirements\n\nJava 11 is required to run the samples.\n\nThe project is built using Gradle and uses https://docs.gradle.org/current/userguide/gradle_wrapper.html[Gradle Wrapper] to take care of downloading the appropriate Gradle version.\n\n=== Running the Samples\n\nEach sample is a Spring Boot based application that can be started:\n\n* using the `bootRun` task of the appropriate sample application\n* from IDE by running sample application's main class\n\nBy default, all samples start web server on port `8080` and attempt to connect to Redis running locally at port `6379`.\nIn order to change those defaults, use appropriate Spring Boot configuration properties.\n\nAll the samples expose the following two HTTP endpoints:\n\n* `POST /topics/{name:[a-z]{2}}`\n+\nGenerates an event and publishes it to the specified Redis channel.\nFor example, the following request will result in event being published to channel named `aa`:\n+\n[source,sh]\n----\n$ curl -s -X POST http://localhost:8080/topics/aa\n----\n\n* `GET /topics/{name:[a-z]{2}}`\n+\nSubscribes to server-sent events published to the specified Redis channel.\nThe following request will subscribe to events published to channel named `aa`:\n+\n[source,sh]\n----\n$ curl -N http://localhost:8080/topics/aa\n----\n\n==== Spring MVC Sample with Imperative Redis\n\nThis sample uses Spring MVC and a traditional imperative Redis using Jedis driver.\n\n[source,sh]\n----\n$ ./gradlew :sample-mvc-imperative:bootRun\n----\n\n==== Spring MVC Sample with Reactive Redis\n\nThis sample uses Spring MVC combined with reactive Redis using Lettuce driver.\n\n[source,sh]\n----\n$ ./gradlew :sample-mvc-reactive:bootRun\n----\n\n==== Spring WebFlux Sample\n\nThis sample uses Spring WebFlux, naturally combined with reactive Redis using Lettuce driver.\n\n[source,sh]\n----\n$ ./gradlew :sample-webflux:bootRun\n----\n\n=== Building from Source\n\nThe project can be built the `build` task:\n\n[source,sh]\n----\n$ ./gradlew build\n----\n\n== Related Issues\n\n- https://github.com/spring-projects/spring-data-redis/issues/2209[spring-projects/spring-data-redis#2209]\n- https://github.com/spring-projects/spring-data-redis/issues/2229[spring-projects/spring-data-redis#2229]\n- https://github.com/spring-projects/spring-data-redis/issues/2386[spring-projects/spring-data-redis#2386]\n- https://github.com/lettuce-io/lettuce-core/issues/705[lettuce-io/lettuce-core#705]\n- https://github.com/cloudfoundry/java-buildpack-memory-calculator/issues/20[cloudfoundry/java-buildpack-memory-calculator#20]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpavic%2Fsamples-spring-sse-redis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvpavic%2Fsamples-spring-sse-redis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvpavic%2Fsamples-spring-sse-redis/lists"}