Set Version to 1.2.0.BUILD-SNAPSHOT
AMQP-253 Add Id Generation Option to AMQP Appender

log4j.appender.amqp.generateId=true

Turns on id generation - useful when configuring a
retry interceptor on the consuming side.

AMQP-253 Polishing

Fix default value; move to Message Properties.
Merge pull request #59 from garyrussell/AMQP-253

* AMQP-253:
  AMQP-253 Add Id Generation Option to AMQP Appender
AMQP-190 Memory Leak With Tx and RabbitTemplate

When the RabbitTemplate is invoked with an existing transaction,
the channel is bound to the thread, and

  ConnectionFactoryUtils.releaseResources(resourceHolder);

is called after processing. There was a commented-out line
in ConnectionFactoryUtils.RabbitResourceSynchronization.afterCompletion()
that would have reset the synchronized state so that
releaseResouces() would "close" the chanel/connection (return
them to the caching factory).

Being commented out, the channel was never removed, and each
transactional template call grabbed a new channel.

However, uncommenting causes issues with the listener container
because it continues to use the channel, so it must not
be closed (made available for reuse).

Added code to reset synch, by default, but not for the listener.

The listener sets a boolean releaseAfterCompletion in the
ResourceHolder to false so that the channel remains and
is not closed (logically or otherwise).
Merge pull request #57 from garyrussell/AMQP-190

* AMQP-190:
  AMQP-190 Memory Leak With Tx and RabbitTemplate
AMQP-251 Update RabbitMQ Client to 2.8.4
Merge pull request #55 from garyrussell/AMQP-251

* AMQP-251:
  AMQP-251 Update RabbitMQ Client to 2.8.4
AMQP-250 Template reply-queue Could Not be Anon.

If the reply queue was defined with an id (rather than name)
attribute, the template's reply container listened on
the wrong queue name.

The template parser set the container's queues attribute
to the reply-queue attribute value, instead of a
RuntimeBeanReference to a bean of that name.

When a <queue name="foo"/> was used, it worked because
the Queue that Spring created during property assignment
had the same name and all was fine (the container uses
the queue name).

Changed the parser to correctly use a bean reference instead.
Merge pull request #52 from garyrussell/AMQP-250

* AMQP-250:
  AMQP-250 Template reply-queue Could Not be Anon.
AMQP-242, AMQP-243: Appender Fixes

Wrap routing key layout formatting call with a synchronized block because Log4J's PatternLayout is not thread-safe. Also added a simple fix to actually use the configured Layout, which it was previously ignoring.

Polishing @garyrussell
Merge pull request #58 from jbrisbin/master
AMQP-249 Fix Hanging Thread/Unacked Messages

Previously, the temporary reply channel used for send and
receive operations (when not using a reply-queue) were configured
for acks, but no ack was sent. The queue is temporary so was
removed when the consumer was cancelled but, with cached channels,
the admin UI showed an unacked count for the channel.

In addition, there was a race condition that could cause a hung
thread. The handover to the calling thread was done using a
SynchronousQueue; if the caller timed out just as the reply
arrived, the consumer thread could hang on the put.

Changed the temporary reply queue declaration to use auto-ack
and changed the SynchronousQueue to an ArrayBlockingQueue.
Merge pull request #50 from garyrussell/AMQP-249

* AMQP-249:
  AMQP-249 Fix Hanging Thread/Unacked Messages
AMQP-254 Add MessageId Advice

The RetryInterceptor requires messages to have an Id. It does not
work in an environent where some messages have an Id and some don't.

This adds an advice to enhance incoming messages with an id if it is
missing. Such messages cannot participate in the normal retry logic
(backoff policy etc), but allows 1 retry (until the redelivered
header is set). For a redelivered message without an Id, that fails,
the advice throws an AmqpRejectAndDontRequeueException, signaling the
container to tell the broker to stop delivering the message.

The broker can be configured to forward such messages to the Dead
Letter Exchange.

Add tests to verify messages with and without Ids use the
appropriated retry mechanism.

Also adds a RejectAndDontRequeueRecoverer. The default
MessageRecoverer simply eats the failed message; this recoverer
throws the message back to the broker enabling DLE/DLQ processing.
Merge pull request #62 from garyrussell/AMQP-254

* AMQP-254:
  AMQP-254 Add MessageId Advice
AMQP-255 Fix Multi Confirm with > 1 Listener

Rabbit can piggy-back confirms - for example, if seq 1, 2, 3 are
sent, it is possible to receive ack #3 with 'multiple' set. These
means 1, 2, and 3 are acked.

This worked fine with just one listener. However, if two or
more listeners (e.g. rabbit templates) are attached, only the
listener for ack #3 is notified (regardless of whether all
the acks belong to it).

The PublisherCallbackChannel maintains two maps: seq-to-listener
and listener-to-map(seq-to-correlation).

This fixes the problem by first finding all the listeners that
have pending confirms at or below the sequence number; and then
uses the second map to send the confirms to the appropriate
listener.

AMQP-255 Polishing

PR Comments
Merge pull request #61 from garyrussell/AMQP-255

* AMQP-255:
  AMQP-255 Fix Multi Confirm with > 1 Listener
AMQP-252 Remove System.out Call in Json Converter
Merge pull request #63 from garyrussell/AMQP-252

* AMQP-252:
  AMQP-252 Remove System.out Call in Json Converter
AMQP-261: add brokerRunning @Rule to integration test