{"id":27230887,"url":"https://github.com/andreaskl/reactive-spring-session-vertx","last_synced_at":"2025-08-21T07:34:31.187Z","repository":{"id":37096331,"uuid":"192410110","full_name":"AndreasKl/reactive-spring-session-vertx","owner":"AndreasKl","description":"Reactive spring session implementation for postgres using eclipse-vertx/vertx-sql-client. Made with ☕","archived":false,"fork":false,"pushed_at":"2024-08-07T04:02:30.000Z","size":452,"stargazers_count":4,"open_issues_count":11,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-16T01:16:04.443Z","etag":null,"topics":["java","kotlin","postgres","reactive","session","spring","spring-boot","spring-session"],"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/AndreasKl.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","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":"2019-06-17T19:56:39.000Z","updated_at":"2024-05-14T08:49:26.000Z","dependencies_parsed_at":"2024-04-02T22:24:26.247Z","dependency_job_id":"2f47ebe3-10e2-4e74-96d9-72fd4d2a1cc8","html_url":"https://github.com/AndreasKl/reactive-spring-session-vertx","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasKl%2Freactive-spring-session-vertx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasKl%2Freactive-spring-session-vertx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasKl%2Freactive-spring-session-vertx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreasKl%2Freactive-spring-session-vertx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreasKl","download_url":"https://codeload.github.com/AndreasKl/reactive-spring-session-vertx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248225870,"owners_count":21068078,"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","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","kotlin","postgres","reactive","session","spring","spring-boot","spring-session"],"created_at":"2025-04-10T13:34:38.683Z","updated_at":"2025-04-10T13:34:39.184Z","avatar_url":"https://github.com/AndreasKl.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://app.travis-ci.com/AndreasKl/reactive-spring-session-vertx.svg?branch=master)](https://app.travis-ci.com/AndreasKl/reactive-spring-session-vertx)\n[![Maven Central](https://img.shields.io/maven-central/v/net.andreaskluth/reactive-spring-session-postgres.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22net.andreaskluth%22%20AND%20a:%22reactive-spring-session-postgres%22)\n[![javadoc](https://javadoc.io/badge2/net.andreaskluth/reactive-spring-session-core/javadoc.svg)](https://javadoc.io/doc/net.andreaskluth/reactive-spring-session-core) \n# reactive-spring-session-vertx\n\nDue to the lack of a distributed reactive Spring Session implementations for relational databases,\nthis projects aims to fill the gap with a fully reactive **PostgreSQL** Spring Session store.\n\nThe implementation is based on **[vertx-sql-client](https://github.com/eclipse-vertx/vertx-sql-client)**.\n\nSupports JDK 8 and up. Does not depend on **Spring Boot** but can be easily used with **Spring Boot**.\n\n## Setup instructions\nA demo project is located under `/reactive-spring-session-sample-app` written in Kotlin.\n`ReactivePostgresSessionConfiguration` registers a `ReactivePostgresSessionRepository` \nand a scheduled task that removes expired sessions from the database. Expired sessions\nare never returned to the user, however could remain in the database until the scheduler\ndoes the cleanup.\n\n```kotlin\n@Configuration\n@Import(ReactivePostgresSessionConfiguration::class)\nclass PostgresSessionConfiguration {\n\n  @Bean\n  fun pgConnectOptions(@Value(\"\\${postgres.port}\") postgresPort: Int): PgConnectOptions =\n    PgConnectOptions()\n      .setHost(\"localhost\")\n      .setPort(postgresPort)\n      .setDatabase(\"session\")\n      .setUser(\"postgres\")\n      .setPassword(\"postgres\")\n      .setIdleTimeout(300)\n      .setConnectTimeout(500)\n\n  @Bean\n  fun poolOptions(): PoolOptions =\n    PoolOptions()\n      .setMaxSize(5)\n      .setMaxWaitQueueSize(10)\n\n  @Bean\n  fun clock(): Clock =\n    Clock.systemUTC()\n\n  @Bean(WebHttpHandlerBuilder.WEB_SESSION_MANAGER_BEAN_NAME)\n  fun webSessionManager(repository: ReactiveSessionRepository\u003cout Session\u003e): WebSessionManager {\n    val sessionStore = SpringSessionWebSessionStore(repository)\n\n    val manager = DefaultWebSessionManager()\n    manager.sessionStore = sessionStore\n    return manager\n  }\n\n}\n```\n\n## Is this production ready?\n**reactive-spring-session-vertx** is used in production **[@REWE digital](https://www.rewe-digital.com/)** for their Spring Gateway based reactive API gateway.\n\n## Build\n\nJust test and build, will start Postgres as embedded databases:\n```bash\nmvn clean verify\n```\n\nDeploy the current SNAPSHOT to **oss.sonatype.org**:\n```bash\nmvn -P release -pl reactive-spring-session-postgres -am clean deploy\n```\n\nDeploy a RELEASE to **oss.sonatype.org**:\n```bash\nmvn release:prepare\n\nmvn -P release clean deploy\n\nmvn -P release nexus-staging:rc-list\n\nmvn -P release -DstagingRepositoryId=netandreaskluth-\u003csome-id\u003e  nexus-staging:release\n```\n\n## Contributing\nSource code formatting is checked with [fmt-maven-plugin](https://github.com/coveooss/fmt-maven-plugin). Configuration files for the formatter of your preferred IDE can be found [here](https://github.com/google/styleguide) a plugin for IntelliJ IDEA can be found [here](https://plugins.jetbrains.com/plugin/8527-google-java-format).\n\n# License \nThe MIT License (https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskl%2Freactive-spring-session-vertx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaskl%2Freactive-spring-session-vertx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskl%2Freactive-spring-session-vertx/lists"}