davsclaus commented on code in PR #30351:
URL: https://github.com/apache/camel/pull/30351#discussion_r4625418307
##########
components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubProducer.java:
##########
@@ -137,7 +138,16 @@ private void send(Exchange exchange) throws Exception {
PubsubMessage message = messageBuilder.build();
ApiFuture<String> messageIdFuture = publisher.publish(message);
- exchange.getIn().setHeader(GooglePubsubConstants.MESSAGE_ID,
messageIdFuture.get());
+ try {
+ exchange.getIn().setHeader(GooglePubsubConstants.MESSAGE_ID,
messageIdFuture.get());
+ } catch (ExecutionException e) {
+ if (orderingKey != null && endpoint.isMessageOrderingEnabled()) {
+ // the publisher pauses an ordering key after a failed
publish, so a redelivery and the later messages
+ // with that key would fail at once
Review Comment:
Fixed in b34544a752: `resumePublish` is in a try/catch, and a
`RuntimeException` of it is added as suppressed to the `ExecutionException` of
the publish, which is rethrown as before.
_Claude Code on behalf of davsclaus_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]