Skip to content
Advertisement

Does Spring AMQP CorrelationData getFuture wait indefinitely without timeout?

In the context of Publisher confirms, when waiting for the CorrelationData’s future (SettableListenableFuture#get()) – does it wait indefinitely or is there a timeout configured under the water?

Advertisement

Answer

It does wait indefinitely. There is just no any opinion and everything is delegated directly to the java.util.concurrent.FutureTask internally in the org.springframework.util.concurrent.SettableListenableFuture implementation.

Not sure why the question, but in normal situation when broker is UP, it is going to answer to confirm during reasonable finite time. If broker is not available, you are going to fail much earlier than you reach a CorrelationData.getFuture() in your code.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement