shashank created CAMEL-27166:
--------------------------------
Summary: camel-google-pubsub - with synchronousPull the consumer
acks the ack id of the header as the route left it, so a route that removes or
changes the headers never acks the message
Key: CAMEL-27166
URL: https://issues.apache.org/jira/browse/CAMEL-27166
Project: Camel
Issue Type: Bug
Components: camel-google-pubsub
Reporter: shashank
Assignee: shashank
h3. What happens
With {{synchronousPull=true}} and the default {{ackMode}}, the consumer acks a
completed exchange and nacks a failed one with {{AcknowledgeSync}}, which reads
the ack id from the {{CamelGooglePubsubMsgAckId}} header when the exchange is
done. A route that removes the headers (for example {{removeHeaders("*")}}
before calling another system), or replaces the message, acks nothing: a WARN
is logged and Pub/Sub delivers the message again after its ack deadline, and
again after every later delivery, until it reaches the dead letter policy if
there is one. A route that changes the header acks or nacks another ack id.
The asynchronous subscriber is not affected: it acks with the
{{AckReplyConsumer}} of the message it received. This is the same defect that
CAMEL-27015 (#30168) (aws2-sqs, aws2-s3, azure-storage-blob) and CAMEL-27064
(#30227) (google-storage, minio, alibaba-mns) fixed in other consumers.
h3. How to reproduce
{{GooglePubsubSynchronousPullAckIdTest}} (camel-google-pubsub, a fake
{{SubscriberStub}} that records the Acknowledge and ModifyAckDeadline
requests): a route with {{removeHeaders("*")}} sends no Acknowledge for the
received message.
h3. Fix
The consumer creates the {{AcknowledgeSync}} of the automatic ack with the ack
id of the received message, which acks or nacks that ack id whatever the
exchange carries. Manual acknowledgement ({{ackMode=NONE}}) is unchanged: it
acks the ack ids of the exchange given, so that an aggregated exchange acks
every grouped message (CAMEL-26647).
_Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)