0

below is my outbound adapter and I want to know the use of nack-channel over here

<int-amqp:outbound-channel-adapter channel="fulfillmentOutboundChannel"
                                   routing-key="xyz"
                                   amqp-template="transactionalRabbitTemplate"
                                   confirm-correlation-expression="payload"
                                   confirm-ack-channel="successRespTransformChannel"
                                   confirm-nack-channel="failureRespTransformChannel"
                                   return-channel="failureRespTransformChannel"
                                   mapped-request-headers="*"


        />
Filburt
  • 17,626
  • 12
  • 64
  • 115

1 Answers1

0

Nacks occur very infrequently - perhaps because of some problem in the broker. From the RabbitMQ Confirms (aka Publisher Acknowledgements):

In exceptional cases when the broker is unable to handle messages successfully, instead of a basic.ack, the broker will send a basic.nack.

...

basic.nack will only be delivered if an internal error occurs in the Erlang process responsible for a queue.

When a nack is received, with your configuration, it will be sent to the nack channel with the original message payload.

Community
  • 1
  • 1
Gary Russell
  • 166,535
  • 14
  • 146
  • 179