3

I have given following configurations to Debezium Postgres connector and registered it. configuration is as following.

{
"name": "shipments-connector",  
"config": {
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"slot.name":"postslot",
"plugin.name": "pgoutput",
"database.hostname": "postgres",
"database.port": "5432",
"database.user": "postgresuser",
"database.password": "postgrespw",
"database.dbname" : "shipment_db",
"database.server.name": "postgres",
"table.include.list": "public.shipments" ,
"snapshot.mode":"always",
"publication.autocreate.mode":"filtered"
}

This custom slot.name is there in the database also.

shipment_db=# select * from pg_replication_slots;

slot_name | plugin | slot_type | datoid | database | temporary | active | active_pid | xmin | catalog_xmin | restart_lsn | confirmed_flush_lsn | wal_status | safe_wal_size -----------+----------+-----------+--------+-------------+-----------+--------+------------+------+--------------+-------------+---------------------+------------+--------------- postslot | pgoutput | logical | 16384 | shipment_db | f | t | 10061 | | 556 | 0/16D2BE0 | 0/16D3E90 | reserved |
debezium | pgoutput | logical | 16384 | shipment_db | f | t | 19401 | | 559 | 0/16D4CE8 | 0/16D4CE8 | reserved |
(2 rows)

But when I run the siddhi app and insert some data to the table it shows logs only for the first insert operation and it doesn't show logs for other insert operations. I am getting following logs for the first insert.

[2022-08-17 16:05:31,430] INFO {io.debezium.connector.postgresql.connection.WalPositionLocator} - First LSN 'LSN{0/16D4028}' received [2022-08-17 16:05:31,430] INFO {io.debezium.connector.postgresql.PostgresStreamingChangeEventSource} - WAL resume position 'LSN{0/16D4028}' discovered [2022-08-17 16:05:31,432] INFO {io.debezium.jdbc.JdbcConnection} - Connection gracefully closed [2022-08-17 16:05:31,442] INFO {io.debezium.connector.postgresql.connection.PostgresReplicationConnection} - Initializing PgOutput logical decoder publication [2022-08-17 16:05:31,456] INFO {io.debezium.connector.postgresql.PostgresStreamingChangeEventSource} - Processing messages [2022-08-17 16:05:31,459] INFO {io.debezium.connector.postgresql.connection.WalPositionLocator} - Message with LSN 'LSN{0/16D4028}' arrived, switching off the filtering [2022-08-17 16:05:31,483] INFO {io.debezium.jdbc.JdbcConnection} - Connection gracefully closed

This means that siddhi app has taken default value (= debezium) for slot.name. Since postgreSQL only one connection can be created from single slot when the slot.name is debezium it doesn't give logs for other insert operations. So can I know a way for siddhi CDC app to take custom slot.name instead of the default slot.name?

Vinoja
  • 94
  • 1
  • 6

1 Answers1

0

You can provide the slot.name as a parameter when defining the cdc source. Have a look at the following documentation[1].

[1]https://siddhi-io.github.io/siddhi-io-cdc/api/2.0.12/

  • I have already given the slot.name as a parameter in the cdc source but it is still getting the default slot.name. – Vinoja Sep 18 '22 at 03:25