qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Ritchie" <ritch...@apache.org>
Subject Re: BindingURL format and AMQDestination class
Date Thu, 17 Jan 2008 09:05:20 GMT
Rajith ,

The BindingURL was writing (as it is java) from the JMS point of view.
Hence destination is where you are publishing to in JMS. Now the
reason the wiki does not match the code is because of a problem I
realised after implementing the original spec. The URL cannot have a
'#' in the middle as this will prevent the URI class from correctly
parsing it. Hence the need to have the routing_key as an option.

I would also be very cautious about changing this format as it is used
in a lot more places that the Java. I would suggest that if you do
wish to change the format then changing the code so that it matches
the wiki documentation would be the way to go. If you do that then a
change will be needed to update the C++ and .NET as they both use this
format to encode the replyTo field.

Really what should happen is that the BindingURL be used solely on the
broker for parsing the bindings defined in the configuration file and
either a simplified version or a new format be decided for replyTo
encoding. We used to use Q|T+RoutingKey but that limited us in the
java to only using the built in exchanges. Perhaps a subclass of
BindingURL could be used to only present the values required to
perform a reply.

On 16/01/2008, Rajith Attapattu <rajith77@gmail.com> wrote:
> folks,
> I see two minor issues with the AMQBindingURL and AMQDestination
> The binding URL is defined as follows.
> <exch_class>://<exch_name>/[<destination>]/[<queue>]?<option>='<value>'[,<option>='<value>']*
> RoutingKey is given as a valid option (See BindingURL class).
> Then in AMQDestination we see that the constructors has a field called
> "destinationName" (in addition to exchangeName).
> As per the AMQP spec, destination refers to the exchange you are publishing.
> Therefore the binding url format is incorrect, as destination has no meaning
> there.
> It cannot be the routing_key as it is given as a valid option. So I propose
> we get rid of it.
> However the documentation here is correct, but sadly not reflected in the
> code properly.
> http://cwiki.apache.org/qpid/bindingurlformat.html
> Also in AMQDestination, destinationName is used as the routingKey which is
> creating confusion and it is also semantically wrong.
> The field destinationName should refer to the exchange we are publishing.
> But we already have a field named "exchangeName".
> So I renamed the field destination to routingKey and modified the code
> accordingly in both AMQQueue and AMQTopic.
> --
> Regards,
> Rajith Attapattu
> Red Hat
> blog: http://rajith.2rlabs.com/

Martin Ritchie

View raw message