On 19 March 2013 16:01, Rajith Attapattu <rajit...@gmail.com> wrote:

> On Tue, Mar 19, 2013 at 11:15 AM, Gordon Sim <g...@redhat.com> wrote:
> > On 03/19/2013 02:55 PM, Rajith Attapattu wrote:
> >>
> >> Speaking with Gordon, I came to the conclusion that we first need to
> >> figure out what we mean by Equals.
> >> Does equals mean,
> >>
> >> If two consumers used the same destination, they should both receive
> >> the same messages (or share, in a shared queue).
> >> If two producers use the same destination, they should both send
> >> messages to the same (queue/exchange ?)
> >
> >
> > The main use of equals I can think of involves a test for equivalence.
> E.g.
> > I may have a producer for Destination A and want to know whether I can
> use
> > that instead of creating a new producer for Destination B. If A equals
> B, I
> > can assume they are equivalent, my existing producer is equivalent to
> > creating a new one.
> >
> > In this case my-queue/subject1 is *not* equivalent to my-queue/subject2
> > (neither is my-exchange/subject1 equivalent to my-exchange/subject2). I
> > would therefore argue that the subject *is* relevant for equality.
> >
> > The same applies if we consider consumers rather than producers.
> >
> > I would also note that in this sort of use case it is safer to return
> false
> > from equals than it is to return true.
>
> I agree with you that it's best to return false negatives instead of
> false positives as the latter can create issues.
> I will add the subject to the equals test, at least that will cover
> some cases, but want be a complete fix.
> Do you have a suggestion for fanout, xml, headers etc ?
>
> Rajith
>
>
As Gordon and I discussed in our other mails, they dont need to be
considered special cases from the perspective of answering the question of
'is this destination object the same as that one?'

Has there been any propgress on updating the equality check? I think we
need to make sure it is modified before the release now that the previous
change is on the release branch.

Robbie

Reply via email to