| // Do not edit directly! |
| // This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page |
| = PostgresSQL Event |
| :linkattrs: |
| :cq-artifact-id: camel-quarkus-pgevent |
| :cq-native-supported: true |
| :cq-status: Stable |
| :cq-status-deprecation: Stable |
| :cq-description: Send and receive PostgreSQL events via LISTEN and NOTIFY commands. |
| :cq-deprecated: false |
| :cq-jvm-since: 1.1.0 |
| :cq-native-since: 1.2.0 |
| |
| [.badges] |
| [.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native since##[.badge-supported]##1.2.0## |
| |
| Send and receive PostgreSQL events via LISTEN and NOTIFY commands. |
| |
| == What's inside |
| |
| * xref:{cq-camel-components}::pgevent-component.adoc[PostgresSQL Event component], URI syntax: `pgevent:host:port/database/channel` |
| |
| Please refer to the above link for usage and configuration details. |
| |
| == Maven coordinates |
| |
| https://code.quarkus.io/?extension-search=camel-quarkus-pgevent[Create a new project with this extension on code.quarkus.io, window="_blank"] |
| |
| Or add the coordinates to your existing project: |
| |
| [source,xml] |
| ---- |
| <dependency> |
| <groupId>org.apache.camel.quarkus</groupId> |
| <artifactId>camel-quarkus-pgevent</artifactId> |
| </dependency> |
| ---- |
| |
| Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications. |
| |
| == Additional Camel Quarkus configuration |
| |
| You can use pgevent extension with Agroal Datasource. |
| |
| Add the quarkus-agroal dependency : |
| [source,xml] |
| ------------------------------------------------------------ |
| <dependency> |
| <groupId>io.quarkus</groupId> |
| <artifactId>quarkus-agroal</artifactId> |
| </dependency> |
| ------------------------------------------------------------ |
| |
| Set Agroal properties, example for named DataSource `pgDatasource` : |
| ----------- |
| quarkus.datasource.pgDatasource.db-kind=pgsql |
| quarkus.datasource.pgDatasource.jdbc.url=jdbc:pgsql://localhost:5432/myDB |
| quarkus.datasource.pgDatasource.username=postgres |
| quarkus.datasource.pgDatasource.password=mysecretpassword |
| quarkus.datasource.pgDatasource.jdbc.max-size=16 |
| ----------- |
| |
| Inject the DataSource name in the camel Route, example : |
| ----------- |
| pgevent:///postgres/testchannel?datasource=#pgDatasource |
| ----------- |
| |