Configuring Connection Details
This section provides instructions for configuring the connection details required to establish communication between your PubSub+ event broker and your third-party system.
PubSub+ Connection Details
The Spring Cloud Stream Binder for PubSub+ uses Spring Boot Auto-Configuration for the Solace Java API to configure its session. In the application.yml
, this typically is configured as follows:
solace: java: host: tcp://localhost:55555 msg-vpn: default client-username: default client-password: default
For more information and options to configure the PubSub+ session, see Spring Boot Auto-Configuration for the Solace Java API.
Preventing Message Loss when Publishing to Topic-to-Queue Mappings
If the connector is publishing to a topic that is subscribed to by a queue, messages may be lost if they are rejected (for example, if queue ingress is shut down).
To prevent message loss, configure the reject-msg-to-sender-on-discard option with the including-when-shutdown
flag.
PostgreSQL Connection Details
To manually configure the PostgreSQL connection details, set the following properties in application.yml:
spring: cloud: stream: pgcdc: bindings: input-0: consumer: endpoint: query-parameters: databaseHostname: <hostname> databasePort: <port> databaseDbname: <database name> username: <database user/role name> <authentication parameter>: <authentication parameter value> <authentication parameter>: <authentication parameter value> ...
Where:
-
databaseHostname
is the hostname of the PostgreSQL database server. -
databasePort
is the connection port of the PostgreSQL database server. -
databaseDbname
is the name of the PostgreSQL database to connect to. -
databaseUser
is the PostgreSQL user to log in as. The PostgreSQL user determines the user role and permissions for the database. -
<authentication parameter>
is a parameter required for authenticating with the PostgreSQL database server. Choose one of:-
Basic Authentication—Use a username and password to authenticate. For more information, see Basic Authentication Parameters.
-
Client Certificate Authentication—Use a client certificate to authenticate. For more information, see Client Certificate Authentication Parameters.
-
Basic Authentication Parameters
Field | Type | Description |
---|---|---|
databaseUser
|
String
|
The username to use for logging in to PostgreSQL. |
databasePassword
|
String
|
The password to use for authenticating with the PostgreSQL database. |
Client Certificate Authentication Parameters
Field | Type | Description |
---|---|---|
databaseSslmode
|
String
|
The SSL mode determines the security level for client-server communications. It controls whether SSL/TLS encryption is used and how rigorously the server's identity is verified. Valid values are:
For more information, see the Protection Provided in Different Modes section of the PostgreSQL documentation. |
databaseSslcert
|
String
|
The path to the SSL Certificate for the client, for example, local/ssl/client.crt . |
databaseSslkey
|
String
|
The path to the file containing the SSL private key for the client.. for example, local/ssl/client.key |
databaseSslpassword
|
String
|
The password to access the client private key from the file specified by databaseSslkey . |
databaseSslrootcert
|
String
|
The path to the database SSL root certificate against which the server is validated, for example, local/ssl/root.crt . |
databaseUser
|
String
|
The username to use for logging in to PostgreSQL. |
Checkpoint Store Configuration
The Connector for PostgreSQL CDC stores the information about the current progress of processing files in a checkpoint store backed by a Last Value Queue (LVQ) on a PubSub+ event broker. The checkpoint store contains information about the files that have been processed and the files that are currently being processed.
The following table lists the configuration options for the Checkpoint Store.
Config Option | Type | Valid Values | Default Value | Description |
---|---|---|---|---|
|
|
Required. The name of the event broker Last Value Queue (spool size 0) to be used for checkpointing. The queue must exist on the same event broker and Message VPN as the target queue. If the LVQ is deleted (administratively) or a message from the LVQ is deleted or consumed by another consumer, the Connector for PostgreSQL CDC will not be able to resume from the last checkpoint. In addition, the LVQ should not be shared by multiple instances of the Connector for PostgreSQL CDC. |
||
|
|
|
|
Optional. Set to |
PostgreSQL CDC Binder Configuration Options
The following properties are available at the PostgreSQL CDC binder level.
Config Option | Type | Valid Values | Description |
---|---|---|---|
|
|
For example, |
The PostgreSQL table from which to consume change events. The destination must include the schema and the name of the table. |
|
|
|
This property must be set to |
PostgreSQL CDC Consumer Configuration Options
The following table lists the Debezium PostgreSQL source-specific properties. For more information about these configuration options, see the Apache Camel Debezium PostgreSQL component documentation.
All properties must be prefixed with spring.cloud.stream.pgcdc.bindings.input-<workflow-id>.consumer.endpoint.query-parameters
.
Example configuration:
pgcdc: bindings: input-0: consumer: endpoint: query-parameters: <connection parameters> pluginName: pgoutput slotName: debezium tableIncludeList: public.inventory schemaIncludeList: public topicPrefix: cdc snapshotMode: initial
Config Option | Type | Valid Values | Default Value | Description |
---|---|---|---|---|
|
|
The name of the PostgreSQL database. |
||
|
|
The name of the PostgreSQL logical decoding slot. A logical decoding slot is a persistent object that maintains a stream of database changes from a plugin. The Connector for PostgreSQL CDC consumes the change stream from the specified slot. For more information, consult your PostgreSQL server administrator. |
||
|
|
The binding name (for example, |
Topic prefix that identifies and provides a namespace for the particular database server/cluster that is capturing changes. |
|
|
|
|
|
The criteria for running a snapshot upon startup of the connector. |
|
|
|
|
The name of the PostgreSQL logical decoding plugin installed on the server. The logical decoding plugin converts write-ahead log (WAL) entries into a stream of changes. For more information, consult your PostgreSQL server administrator. |
|
|
The user to authenticate with PostgreSQL database. |
||
|
|
Password to use for authentication. |
||
|
|
The SSL mode to authenticate with the PostgreSQL database. |
||
|
|
The SSL Certificate for the client. |
||
|
|
The SSL private key for the client. |
||
|
|
The database SSL password to authenticate with the PostgreSQL database. |
||
|
|
The database SSL root certificate against which the server is validated. |
||
|
|
|
A comma-separated list of operations to skip during streaming. Valid options include: |
|
|
|
|
|
Specifies when a publication is to be created. Applies only when streaming changes using |
|
|
|
Indicates whether delete operations should be represented by a delete event and a subsequent tombstone event. |
|
|
This parameter is ignored. |
|||
|
This parameter is ignored. |
|||
|
This parameter is ignored. |
|||
|
This parameter is ignored. |
|||
|
This parameter is ignored. |
PostgreSQL CDC Micro-Integration Processing Options
The following section describe the properties specific to the Connector for PostgreSQL CDC. All properties are prefixed with spring.cloud.stream.camel.bindings.<input-x>.consumer.endpoint.query-parameters
.
Config Option | Type | Valid Values | Default Value | Description |
---|---|---|---|---|
|
|
|
|
Indicates whether to include the schema information in the final payload. |
|
|
|
|
Indicates whether to skip delete events. When |
PostgreSQL CDC Injected Headers
The following file-related headers are injected into each message. The examples illustrate the header values for an update to the PostgreSQL source table.
Header Name | Type | Description |
---|---|---|
|
|
Values for the connector are |
|
|
The name of the database. |
|
|
The name of the schema. For example, |
|
|
The name of the table. For example, |
|
|
The log sequence number. |
|
|
The transaction ID of the database transaction. |
|
|
The key of the event. For example, |
|
|
The state of the row before the event occurred. For example, |
|
|
The time at which the connector processed the event. |