Skip to content

Conversation

@garyrussell
Copy link
Contributor

Previously, convertAndSend(), convertSendAndReceive() methods
"converted" an Object that was already a Message to a Message
with a null body.

Now, if the object is already a Message, no conversion is
performed.

Initial Commit

Add support for multiple acks in one call.

AMQP-213 Polishing

Move confirmation state to PublisherCallbackChannel. Allows
the RabbitTemplate to handle confirms from multiple
channels.

Remove unnecessary synchronization.

Add tests for multiple threads - verifying the
functionality when more than one thread concurrently
uses the template.

NOTES: The CF cache size must be large enough
to cover the number of required channels - otherwise
the channel is closed before the confirms are received.

This could be alleviated by not closing channels if
P.C. are turned on.

Each PublisherCallbackConnection has two maps, the
first map (seqToListener) identifies which listener
gets the confirmation. The second map (pendingConfirms)
is a map of maps where the key is the listener and
the value is a map of pending confirms for that
listener. This map is given back to the listener
when registering.

In this way, the Rabbit template does not need to
hold a reference to every connection he has used.
Instead, when a connection is closed, the listener
is informed via a call to removePendingConfirmsReference().

The listener  uses the pending confirms maps to
determine if any confirms have expired.

Add test for two templates sharing the same
factory, ensuring the appropriate template
gets the confirmation.

AMQP-213 Polishing

AMQP-213 Add Support for Basic.Return

The rabbit template will be registered to receive return
messages if it is provided with a ReturnCallback. Either
mandatory or immediate must also be set for returns.

mandator and immediate are ignored if no callback is provided.

AMQP-213 Polishing

The RabbitTemplate can only support one each of
ConfirmCallback and ReturnCallback because there
is no way to correlate back to the caller.

In situations where more than one client is needed,
each needs its own RabbitTemplate.

The connection factory, and hence the connection and
channels, can be shared across templates.

AMQP-213 Add Namespace Support for Returns

Attributes added to template for mandatory, immediate,
return-callback.

Also confirm-callback for confirms.

AMQP-213 Return Reply Code Etc

Pass the reply code, reply text, exchange, and
routing key back to the client on returns.

AMQP-213 Polishing

Fix non-default exchange on convertAndSend.

AMQP-213 Polishing PR Review
Previously, convertAndSend(), convertSendAndReceive() methods
"converted" an Object that was already a Message to a Message
with a null body.

Now, if the object is already a Message, no conversion is
performed.
olegz added a commit to olegz/spring-amqp that referenced this pull request May 10, 2012
* AMQP-219:
  AMQP-219 RabbitTemplate Conversion With Message
@olegz olegz closed this May 10, 2012
@garyrussell garyrussell deleted the AMQP-219 branch December 13, 2013 22:17
artembilan pushed a commit that referenced this pull request Mar 23, 2017
Upgrade github-pages gem to fix deprecation warnings
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.

2 participants