Siddhi CDC Postgres app not taking custom slot.name

33 views
Skip to first unread message

Vinoja

unread,
Aug 17, 2022, 12:50:24 PM8/17/22
to siddhi-dev
Hi ,

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?
Reply all
Reply to author
Forward
0 new messages