Skip to content

Conversation

@garyrussell
Copy link
Contributor

Issuing a PR just to get this moving again - hopefully someone has time to review.

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

AMQP-206 Add queue-arguments Attribute

<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:queue-arguments id="haArgs">
	<entry key="x-ha-policy" value="all" />
    </rabbit:queue-arguments>

    <rabbit:queue name="si.test.queue" queue-arguments="haArgs" />

AMQP-206 Fix Parser Tests

AMQP-206 ReConnect To Mirrored Queue

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.

AMQP-206 Polishing

Cleanup retry counter name; trap exception on cancel of
temporary reply queue.

AMQP-206 Add reply-queue to RabbitTemplate

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" />

AMQP-206 Stack Reply Correlation

Stacks (pushes/pops) correlation when using a fixed queue for
replies in sendAndReceive methods.

Now supports

templatsendAndReceive()->listener->templateSendAndReceive()->
   listener->templateSendAndReceive->...

and the replies get correlated in each template appropriately.

AMQP-206 Polishing

Add exclusive test for addresses attribute; add parser test.
Improve configuration of reply-queue listener on rabbit template.
Previously a disjoint listener was required. Now the listener
is a child element of the template itself.

	<rabbit:template id="withReplyQ" connection-factory="connectionFactory" reply-queue="reply.queue">
		<rabbit:reply-listener />
	</rabbit:template>

The reply-listener is a full-blown listener container, but uses the
template's connection factory and so that attribute, as well as the
message-converter is disallowed at run-time.
Remove disallowed attributes from <retry-listener/> child element
in schema.
Update docs with addresses attribute on ConnectionFactory and
reply-queue on template.
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