-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Milestone
Description
I have workflow where PUBLISHER CONFIRM is waited for and then on receiving of this message, I manually ACK messages on other queue.
If I put this config for AmqpOutboundEndpoint:
AmqpOutboundEndpoint outboundEndpoint = new AmqpOutboundEndpoint(ackTemplate());
outboundEndpoint.setConfirmNackChannel(nackFromPublisherConfirmsChannel())
and ackTemplate uses connectionFactory with publisher-confirms: true, if one of ACK (PUB. CONF) messages from server to client is dropped, I never ACK message on other queue.
If inside AmqpOutboundEndpoint in the method send instead of this code
((RabbitTemplate) this.amqpTemplate).send(exchangeName, routingKey, amqpMessage, correlationData);
I use this:
RabbitTemplate rt = (RabbitTemplate)this.amqpTemplate;
rt.invoke(t -> {
t.send(exchangeName, routingKey, amqpMessage, correlationData);
t.waitForConfirmsOrDie(15_000);
return true;
});
everything works as expected - ACK is timed out, and we forwad message to nackFromPublisherConfirmsChannel.
Reactions are currently unavailable