Hi All

I have been thinking about adding support in the JMS client for the
new address format currently implemented in python and c++ by Rafi and
Gordon.
I am exploring the viability of the following approach. Comments and
suggestions are most welcomed.
Please feel free to suggest class names etc. It's not easy coming up
with names :).

Given that AMQDestination is used all over the code base, I am
thinking about using an incremental approach to minimize disruptions.
I have tried a prototype of this idea and it seems to work reasonably well.

1. Extract an interface from the current AMQDestination class and name
the interface as AMQDestination (which extends the
javax.jms.Destination).
2. The current AMQDestination class will be renamed to
AMQBindingURLDestination which implements AMQDestination

Step 1 & 2 will ensure that the current code compiles and that
majority of the code remains unchanged.
Since the current AMQDestination abstract class is based on the
binding URL concept I suggest to rename it to AMQBindingURLDestination

3. Add an abstract class AMQAddressDestination that implements AMQDestination.
4. Add AMQAddressDestination_0_10
5. Add support in AMQSession_0_10, BMProducer/Consumer_0_10 to check
if the destination type and support appropriate behaviour.

Step 3 will add generic support for the new addressing format and step
4 a mapping to the 0_10 syntax.
Step 5 will provide the required functionality to support the address
format while retaining backwards compatibility.

5. Later on we can look at making AMQDestination a proper interface
rather than a stop gap measure.
    In order to do this a fair bit of tinkering would be needed in the
AMQSession, BMProducer/Consumer etc..

We would obviously need a parser for the new addressing format.
I believe Rafi has volunteered to whip that as he was working on one
for python :)

How does the above plan sound?
Btw the JIRA for this is QPID-1831

Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org

Reply via email to