On Tue, Mar 26, 2013 at 9:04 AM, Gordon Sim <g...@redhat.com> wrote:
> On 03/25/2013 06:22 PM, Rajith Attapattu wrote:
>>
>> I think as an interim solution I will add a check for subjects.
>>
>> Longer term I think (especially when we work on the new JMS client) we
>> should probably look at implementing this for Queues and Topics as
>> follows.
>> 1. Queues, if getQueueName() is the same then the destinations are equal.
>> 2. Topics, if getTopicName() is the same then the destinations are
>> equal.
>
>
> As mentioned in an earlier response, if a Destination can contain a default
> subject then the presence of difference subjects in two Destination
> instances means they are not equivalent when creating consumers or
> producers, and in quite a significant way.
>
> I don't understand the rationale for your long term approach above. It seems
> to essentially revert to the 'type and name only' option you initially
> preferred. Why do you think that is a better long term option?
>
> If people want to merely compare the queue or topic name they can do that
> explicitly. I think the equals() method should be a stronger test for
> equivalence.

I guess I over simplified it here, and it isn't sufficient :(
My thinking behind this was,

1. If two producers are sending to the same Queue or two consumers
receiving from the same Queue, then they are equivalent.
    In 0-10 terms, just the queue name.
    But I agree with you that if you send to the same Queue with
different subjects then they are different.

2. If two producers are sending to the same Topic or two consumers
receiving from the same Topic, then they are equivalent.
    In 0-10 terms, the exchange/routingkey (name/subject)combination.

Rajith

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
> For additional commands, e-mail: dev-h...@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to