Skip to content

AmqpOutboundEndpoint publisher confirms timeout? #2755

@bojanv55

Description

@bojanv55

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions