AMQP-213 Publisher Confirms/Returns

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
Merge pull request #26 from garyrussell/AMQP-213

* AMQP-213c:
  AMQP-213 Publisher Confirms/Returns
  AMQP-206 Support Rabbit HA
AMQP-219 RabbitTemplate Conversion With Message

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.
Merge pull request #19 from garyrussell/AMQP-219

* AMQP-219:
  AMQP-219 RabbitTemplate Conversion With Message
AMQP-215 Federated Exchange Support

Initial commit - schema, parser, parser tests,
integration tests.

TODO: doc.

Note: Federated exchanges need some hard config
on the server. The test cases use this

[
    {rabbitmq_federation,
     [
       {upstream_sets, [{"upstream-set", [[{connection, "upstream-server"} ]]}
                       ]},
       {connections, [{"upstream-server", [{host, "somehost"}]}
                     ]}
     ]
    }
].

If not available, the tests will be ignored.

AMQP-215 Reference Documentation

Add information about federated exchanges.

AMQP-215 Polishing - remove test exchanges.
Merge pull request #27 from garyrussell/AMQP-215

* AMQP-215:
  AMQP-215 Federated Exchange Support
AMQP-201 Exchange-to-Exchange Binding

The BindingFactoryBean already supported exchange to exchange
binding. Add namespace support; remove 'required' from queue
attribute in XSD; add 'exchange' (optional) and enforce XOR
in parser.

Builds on parser refactoring for Federated Exchange.

Tested with a real broker with the amqp-sample.

    <rabbit:direct-exchange name="si.test.exchange">
        <rabbit:bindings>
            <rabbit:binding queue="si.test.queue" key="si.test.binding" />
        </rabbit:bindings>
    </rabbit:direct-exchange>

    <rabbit:direct-exchange name="si.test.exchange2">
        <rabbit:bindings>
            <rabbit:binding exchange="si.test.exchange" key="si.test.binding" />
        </rabbit:bindings>
    </rabbit:direct-exchange>
Merge pull request #29 from garyrussell/AMQP-201

* AMQP-201:
  AMQP-201 Exchange-to-Exchange Binding
AMQP-228 - Doc - Fix Incorrect Code Samples
Merge pull request #28 from ghillert/AMQP-228

* AMQP-228:
  AMQP-228 - Doc - Fix Incorrect Code Samples
passing basic tests

it might help if I added the files to git

fixed for maps

removed bad import

removed ClassMapper

formatted code after importing eclipse-code-formatter.xml

formatted test code

added author tag

Reinstated the ClassMapper interface, Renamed DefaultJavaTypeMapper to DefaultClassMapper, DefaultClassMapper now implements ClassMapper and JavaTypeMapper interfaces, Moade TypeFactory imports static.

Reverted DefaultClassMapper. Moved DefaultJavaTypeMapper back.

added missing type mapper classes

Implemented backward compatibility with ClassMapper
Merge pull request #14 from SamNelson/AMQP-202
Created separate branch to do the merge since the work was done on the master
* AMQP-202:
  passing basic tests
AMQP-207 XSD Documentation

Remove explicit mention of default exchange if key is not provided.
However, considering that no-key is still a valid option, and would result in binding to the default exchange
we may want to consider making 'key' a required field on the directExchange binding while also stating that
if you want the default binding than you should not have a <binding> defined in the first place.
Merge pull request #30 from olegz/AMQP-207