Skip to content

Conversation

@garyrussell
Copy link
Contributor

_Not ready for merge_

Just looking for comments; specifically the ability to provide queue arguments to be applied to temporary reply queues, as well as adding the queue-arguments attribute to <queue/> as an alternative to declaring a child element.

@olegz - I removed the string-to-map conversion from the interim commit as we discussed the other day.

Also added the ability to provide a list of addresses to the CF for HA.

LongString moved from client.impl to client

Channel.setReturnListener changed to Channel.addReturnListener
- Configure a list of addresses in ConnectionFactory
- Allow arguments (e.g. HA) for temporary reply queue creation
<queue/> now supports either <queue-arguments /> element
or a queue-arguments attribute which is a reference to
a <queue-arguments /> bean.

<queue-arguments /> is promoted to a top-level bean,
allowing for re-use, such as...

    <rabbit:template id="amqpTemplate" connection-factory="connectionFactory"
            reply-queue-arguments="haArgs" />

    <rabbit:queue-arguments id="haArgs">
	<entry key="x-ha-policy" value="all" />
    </rabbit:queue-arguments>

    <rabbit:queue name="si.test.queue" queue-arguments="haArgs" />
For consistency with <queue/> allow the queue arguments
(reply-queue-arguments) to be ether an attribute or
child element.
If a consumer is connected to a mirror (slave), and the
master dies, the queue is moved. The consumer is given a
cancel notification, indicating we need to reconnect.

However, the move might not be complete, so we retry the
queue declaration a number of times before failing.
Cleanup retry counter name; trap exception on cancel of
temporary reply queue.
Allow specification of an explicit queue for replies. Adds
a correlation header to sendAndReceive messages (spring_reply_correlation)
which is used to correlate replies on the reply queue.

The queue is supplied to the template via the reply-queue
attribute; the template must be added as a <listener/> to a
<listener-container/> for the same queue. For example...

    <rabbit:template id="amqpTemplate" connection-factory="connectionFactory" reply-queue="si.test.replies" />

    <rabbit:listener-container id="replyContainer" connection-factory="connectionFactory" task-executor="reply-exec">
    	<rabbit:listener ref="amqpTemplate" queues="si.test.replies"/>
    </rabbit:listener-container>

    <rabbit:queue name="si.test.replies" queue-arguments="haArgs" />
artembilan pushed a commit that referenced this pull request Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant