{"id":21939346,"url":"https://github.com/r2dbc/r2dbc-proxy","last_synced_at":"2025-04-06T13:11:52.379Z","repository":{"id":34779625,"uuid":"161242659","full_name":"r2dbc/r2dbc-proxy","owner":"r2dbc","description":"R2DBC Proxying Framework","archived":false,"fork":false,"pushed_at":"2024-07-07T06:26:43.000Z","size":7235,"stargazers_count":149,"open_issues_count":3,"forks_count":21,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-30T11:11:11.349Z","etag":null,"topics":["observability","r2dbc","reactive","reactive-streams"],"latest_commit_sha":null,"homepage":"https://r2dbc.io","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/r2dbc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2018-12-10T22:07:15.000Z","updated_at":"2025-02-19T03:25:51.000Z","dependencies_parsed_at":"2023-11-21T07:27:25.672Z","dependency_job_id":"77cc8407-b1a0-4b4a-a2ba-3a9fa1caf3ca","html_url":"https://github.com/r2dbc/r2dbc-proxy","commit_stats":{"total_commits":261,"total_committers":11,"mean_commits":"23.727272727272727","dds":"0.16475095785440608","last_synced_commit":"f15b85be67c1fa444cbc7314ecce4ca3a0393425"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dbc%2Fr2dbc-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dbc%2Fr2dbc-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dbc%2Fr2dbc-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r2dbc%2Fr2dbc-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r2dbc","download_url":"https://codeload.github.com/r2dbc/r2dbc-proxy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485290,"owners_count":20946398,"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":["observability","r2dbc","reactive","reactive-streams"],"created_at":"2024-11-29T02:19:00.573Z","updated_at":"2025-04-06T13:11:52.362Z","avatar_url":"https://github.com/r2dbc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reactive Relational Database Connectivity Proxy Framework [![Java CI with Maven](https://github.com/r2dbc/r2dbc-proxy/workflows/Java%20CI%20with%20Maven/badge.svg?branch=main)](https://github.com/r2dbc/r2dbc-proxy/actions?query=workflow%3A%22Java+CI+with+Maven%22+branch%3Amain) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-proxy/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.r2dbc/r2dbc-proxy)\n\nThis project contains the proxy framework of the [R2DBC SPI][r]. R2DBC is a [Reactive Foundation][rf] project.\n\n[r]: https://github.com/r2dbc/r2dbc-spi\n[rf]: https://reactive.foundation\n\n## Code of Conduct\n\nThis project is governed by the [R2DBC Code of Conduct](https://github.com/r2dbc/.github/blob/main/CODE_OF_CONDUCT.adoc). By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to [info@r2dbc.io](mailto:info@r2dbc.io).\n\n\n## Maven configuration\n\nArtifacts can be found on [Maven Central](https://search.maven.org/search?q=r2dbc-proxy):\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.r2dbc\u003c/groupId\u003e\n  \u003cartifactId\u003er2dbc-proxy\u003c/artifactId\u003e\n  \u003cversion\u003e${version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIf you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version.\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.r2dbc\u003c/groupId\u003e\n  \u003cartifactId\u003er2dbc-proxy\u003c/artifactId\u003e\n  \u003cversion\u003e${version}.BUILD-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n\n\u003crepository\u003e\n  \u003cid\u003esonatype-nexus-snapshots\u003c/id\u003e\n  \u003cname\u003eSonatype OSS Snapshot Repository\u003c/name\u003e\n  \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n\u003c/repository\u003e\n```\n\n## R2DBC SPI versions\n\n| R2DBC Proxy | R2DBC SPI\n| ----------- | ----------\n|     `1.0.x`, `1.1.x` | `1.0.x`\n|     `0.9.x` | `0.9.x`\n|     `0.8.x` | `0.8.x`\n\n\n## Documentation\n\n- Current release\n  - [Reference Doc.][reference-current]\n  - [API Doc.][javadoc-current]\n  - [Changelog][changelog-current]\n- Snapshot\n  - [Reference Doc.][reference-snapshot]\n  - [API Doc.][javadoc-snapshot]\n  - [Changelog][changelog-snapshot]\n- Other versions (TBD)\n\n[reference-current]: http://r2dbc.io/r2dbc-proxy/docs/current/docs/html\n[reference-snapshot]: http://r2dbc.io/r2dbc-proxy/docs/current-snapshot/docs/html\n[javadoc-current]: http://r2dbc.io/r2dbc-proxy/docs/current/api/\n[javadoc-snapshot]: http://r2dbc.io/r2dbc-proxy/docs/current-snapshot/api/\n[changelog-current]: http://r2dbc.io/r2dbc-proxy/docs/current/CHANGELOG.txt\n[changelog-snapshot]: http://r2dbc.io/r2dbc-proxy/docs/current-snapshot/CHANGELOG.txt\n\n\n## Getting Started\n\nHere shows how to create a proxy `ConnectionFactory`.\n\n### URL Connection Factory Discovery\n\n```java\nConnectionFactory connectionFactory = ConnectionFactories.get(\"r2dbc:proxy:\u003cdriver\u003e//\u003chost\u003e:\u003cport\u003e\u003e/\u003cdatabase\u003e[?proxyListener=\u003cfqdn\u003e]\");\n```\n\nSample URLs:\n```\n# with driver\nr2dbc:proxy:postgresql://localhost:5432/myDB?proxyListener=com.example.MyListener\n\n# with pooling\nr2dbc:proxy:pool:postgresql://localhost:5432/myDB?proxyListener=com.example.MyListener\u0026maxIdleTime=PT60S\n```\n\n### Programmatic Connection Factory Discovery\n```java\nConnectionFactory connectionFactory = ConnectionFactories.get(ConnectionFactoryOptions.builder()\n   .option(DRIVER, \"proxy\")\n   .option(PROTOCOL, \"postgresql\")\n   .build());\n\nMono\u003cConnection\u003e connection = connectionFactory.create();\n```\n\nSupported Connection Factory Discovery options:\n\n| Option | Description\n| ------ | -----------\n| `driver` | Must be `proxy`\n| `protocol` | Delegating connection factory driver\n| `proxyListener` | Comma separated list of fully qualified proxy listener class names  _(Optional)_\n\nWhen programmatically `ConnectionFactoryOptions` are constructed, `proxyListener` option allows following values:\n- Comma separated list of fully qualified proxy listener class names\n- Proxy listener class\n- Proxy listener instance\n- Collection of above\n\n### Programmatic creation with `ProxyConnectionFactory`\n\n```java\nConnectionFactory original = ...\n\nConnectionFactory connectionFactory = ProxyConnectionFactory.builder(original)\n    .onAfterQuery(queryInfo -\u003e\n        ...  // after query callback logic\n    )\n    .onBeforeMethod(methodInfo -\u003e\n        ...  // before method callback logic\n    )\n    .listener(...)  // add listener\n    .build();\n\nPublisher\u003c? extends Connection\u003e connectionPublisher = connectionFactory.create();\n\n// Alternative: Creating a Mono using Project Reactor\nMono\u003cConnection\u003e connectionMono = Mono.from(connectionFactory.create());\n```\n\n\n## Samples\n\n[r2dbc-proxy-samples][r2dbc-proxy-samples] repository contains sample listener implementations.\n\n- Distributed tracing - [TracingExecutionListener][TracingExecutionListener]\n- Micrometer metrics - [MetricsExecutionListener][MetricsExecutionListener]\n\n\n[r2dbc-proxy-samples]: https://github.com/ttddyy/r2dbc-proxy-examples\n[TracingExecutionListener]: https://github.com/ttddyy/r2dbc-proxy-examples/blob/master/listener-example/src/main/java/io/r2dbc/examples/TracingExecutionListener.java\n[MetricsExecutionListener]: https://github.com/ttddyy/r2dbc-proxy-examples/blob/master/listener-example/src/main/java/io/r2dbc/examples/MetricsExecutionListener.java\n\n## Getting Help\n\nHaving trouble with R2DBC? We'd love to help!\n\n* Check the [spec documentation](https://r2dbc.io/spec/0.8.1.RELEASE/spec/html/), and [Javadoc](https://r2dbc.io/spec/0.8.1.RELEASE/api/).\n* If you are upgrading, check out the [changelog](https://r2dbc.io/spec/0.8.1.RELEASE/CHANGELOG.txt) for \"new and noteworthy\" features.\n* Ask a question - we monitor [stackoverflow.com](https://stackoverflow.com) for questions\n  tagged with [`r2dbc`](https://stackoverflow.com/tags/r2dbc). \n  You can also chat with the community on [Gitter](https://gitter.im/r2dbc/r2dbc).\n* Report bugs with R2DBC Proxy at [github.com/r2dbc/r2dbc-proxy/issues](https://github.com/r2dbc/r2dbc-proxy/issues).\n\n## Reporting Issues\n\nR2DBC uses GitHub as issue tracking system to record bugs and feature requests. \nIf you want to raise an issue, please follow the recommendations below:\n\n* Before you log a bug, please search the [issue tracker](https://github.com/r2dbc/r2dbc-proxy/issues) to see if someone has already reported the problem.\n* If the issue doesn't already exist, [create a new issue](https://github.com/r2dbc/r2dbc-proxy/issues/new).\n* Please provide as much information as possible with the issue report, we like to know the version of R2DBC Proxy that you are using and JVM version.\n* If you need to paste code, or include a stack trace use Markdown ``` escapes before and after your text.\n* If possible try to create a test-case or project that replicates the issue. \nAttach a link to your code or a compressed file containing your code.\n\n## Building from Source\n\nYou don't need to build from source to use R2DBC Proxy (binaries in Maven Central), but if you want to try out the latest and greatest, R2DBC Proxy can be easily built with the\n[maven wrapper](https://github.com/takari/maven-wrapper). You also need JDK 1.8 and Docker to run integration tests.\n\n```bash\n $ ./mvnw clean install\n```\n\nIf you want to build with the regular `mvn` command, you will need [Maven v3.5.0 or above](https://maven.apache.org/run-maven/index.html).\n\n_Also see [CONTRIBUTING.adoc](https://github.com/r2dbc/.github/blob/main/CONTRIBUTING.adoc) if you wish to submit pull requests. Commits require `Signed-off-by` (`git commit -s`) to ensure [Developer Certificate of Origin](https://developercertificate.org/)._\n\n### Building the documentation\n\nBuilding the documentation uses [maven asciidoctor plugin][asciidoctor-maven-plugin].\n\n```bash\n $ ./mvnw clean exec:java@generate-micrometer-docs asciidoctor:process-asciidoc\n```\n\n[asciidoctor-maven-plugin]: https://github.com/asciidoctor/asciidoctor-maven-plugin\n\n\n## Staging to Maven Central\n\nTo stage a release to Maven Central, you need to create a release tag (release version) that contains the desired state and version numbers (`mvn versions:set versions:commit -q -o -DgenerateBackupPoms=false -DnewVersion=x.y.z.(RELEASE|Mnnn|RCnnn`) and force-push it to the `release-0.x` branch. This push will trigger a Maven staging build (see `build-and-deploy-to-maven-central.sh`).\n\n## License\nThis project is released under version 2.0 of the [Apache License][l].\n\n[l]: https://www.apache.org/licenses/LICENSE-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr2dbc%2Fr2dbc-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr2dbc%2Fr2dbc-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr2dbc%2Fr2dbc-proxy/lists"}