Clone
 

bahaa zaid <bahaa.zaid@pixelogicmedia.com> in camel-git

pg-replication-slot fix: if PG connection got lost while trying to send (#3389)

the status to PG, the reconnect logic will never be called and the

exchange will be reprocessed forever.

Explanation:

After we receive the payload from PostgreSQL, we keep it in memory so we

can process it again and again in case the processing of the exchange

fails. After the successful completion of the exchange, we (1) send the

status to PostgreSQL, (2) reset the payload, and (3) we receive the next

one.

If for some reason we lose the connection while trying to do step 2, the

payload will never get reset, and it will be processed forever. We need

to reset the payload first so in case of failure in updating the status,

the next poll will reconnect and receive the next payload. The next

status update cover both payload as LSNs are sequential.

pg-replication-slot fix: if PG connection got lost while trying to send (#3389)

the status to PG, the reconnect logic will never be called and the

exchange will be reprocessed forever.

Explanation:

After we receive the payload from PostgreSQL, we keep it in memory so we

can process it again and again in case the processing of the exchange

fails. After the successful completion of the exchange, we (1) send the

status to PostgreSQL, (2) reset the payload, and (3) we receive the next

one.

If for some reason we lose the connection while trying to do step 2, the

payload will never get reset, and it will be processed forever. We need

to reset the payload first so in case of failure in updating the status,

the next poll will reconnect and receive the next payload. The next

status update cover both payload as LSNs are sequential.

Implementing PostgreSQL Replication Slot consumer Camel component.

    • -0
    • +79
    /components/camel-pg-replication-slot/pom.xml
  1. … 14 more files in changeset.