[
https://issues.apache.org/jira/browse/CAMEL-26151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136584#comment-18136584
]
Claus Ibsen commented on CAMEL-26151:
-------------------------------------
PR: https://github.com/apache/camel/pull/28921
The exchange keeps its generated id now. The LSN is in the new
CamelPgReplicationSlotLsn header. Upgrade guide entry added for 4.24.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> 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
> Assignee: Claus Ibsen
> Priority: Minor
> 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)