Claus Ibsen created CAMEL-26151:
-----------------------------------

             Summary: camel-pg-replication-slot - the exchange id is the last 
received LSN, which is not unique (events of one transaction share it)
                 Key: CAMEL-26151
                 URL: https://issues.apache.org/jira/browse/CAMEL-26151
             Project: Camel
          Issue Type: Bug
          Components: camel-pg-replicationslot
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of pg-replication-slot (CAMEL-24961, 
PR #28393).

h4. 1. The exchange id is not unique

{{PgReplicationSlotConsumer}} (main 2a465aa4814c, line 142) sets the exchange 
id to {{stream.getLastReceiveLSN().asString()}}. Several messages share the 
same LSN (for example the Begin and the Insert event of one transaction with 
test_decoding), and the value can be {{0/0}}, so exchange ids repeat. Anything 
that relies on a unique exchange id (idempotency, aggregation, tracing, 
inflight registry) then mixes up exchanges. Checked on 4.24.0-SNAPSHOT with 
PostgreSQL 17 in Docker.

Proposed: keep the generated exchange id and put the LSN in a header (an 
upgrade guide entry for the changed exchange id).

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to