2
votes

I am planning to use Spring Cloud Stream for my project. Is it there possible to use Publisher Confirms (aka Publisher Acknowledgements), i.e. registering a confirm callback as described in http://docs.spring.io/spring-amqp/reference/html/_reference.html#cf-pub-conf-ret? Or are there other possibilities to receive an ack from RabbitMQ that it has received the message from the client?

2

2 Answers

1
votes

No; it's not supported. You can, however, set the transactional flag on the producer which cause an exception to be thrown if the send fails.

While publisher confirms are generally much "faster" than transactions, that is really only the case when you send a bunch of messages and wait for their confirmations later.

Since we are in a stream here; you'd be sending one message, then waiting for the confirm. That is not going to be significantly faster than just using a transaction.

If you want to use confirms; you would have to use a RabbitTemplate or Spring Integration outbound channel adapter directly, instead of the binder.