Sonar Build (Master) - https://sonar.spring.io/dashboard/index/org.springframework.amqp:spring-amqp-dist

Build: #2393 was successful Scheduled with changes by Gary Russell

Build result summary

Details

Completed
Duration
10 minutes
Labels
None
Agent
bamboo-08.af.pivotal.io
Revision
04018ad6ed111467cf1c9c7a73e9204168e1c1da 04018ad6ed111467cf1c9c7a73e9204168e1c1da
Successful since
#2384 ()

Code commits

Author Commit Message Commit date
Gary Russell Gary Russell 04018ad6ed111467cf1c9c7a73e9204168e1c1da 04018ad6ed111467cf1c9c7a73e9204168e1c1da GH-846: Fix send and receive with confirms
Fixes https://github.com/spring-projects/spring-amqp/issues/846

Send and receive with a direct container (the default) fails on the second
operation because the template is not registered as a listener with the
callback channel.

`doSendAndReceiveWithDirect` does not invoke `doSendAndReceiveAsListener`
within `execute` because the channel is obtained from the container.

The first send and receive succeeds because `execute` is invoked once in the
`useDirectReplyTo` which determines whether the broker supports direct
reply-to.

`addListener()` is called from `execute()` after a channel has been received
from the cache.

Fix is to call `addListener()` from `doSendAndReceiveWithDirect`.

**cherry-pick to 2.0.x**

JIRA issues

IssueDescriptionStatus
Unknown Issue TypeGH-846Could not obtain issue details from JIRA