On 29 August 2014 19:02, Gordon Sim <[email protected]> wrote: > On 08/29/2014 04:57 PM, Rob Godfrey wrote: > >> On 29 August 2014 17:39, Gordon Sim <[email protected]> wrote: >> >>> I'm not opposed to change. However I don't think the use of subject for >>> what might be termed 'routing' is obviously wrong or unintended by the >>> current spec and therefore an illogical choice for anything 'designed >>> around AMQP 1.0'. >>> >>> >>> I'm not saying it's wrong... >> > > I think you are (and that in itself I don't object to): >
I make a distinction between wrong as in "incorrect" and bad as in sub-optimal :-) > > On 08/29/2014 03:42 PM, Rob Godfrey wrote: >> >>> On 29 August 2014 16:24, Gordon Sim <[email protected]> wrote: >>> >>>> On 08/29/2014 03:12 PM, Rob Godfrey wrote: >>>> >>>>> If an application is designed around using AMQP 1.0, I would not >>>>> normally >>>>> expect them to be putting routing information in the subject field. >>>>> >>>> >>>> That depends on what you define to be routing information. I think it >>>> is a >>>> perfectly sensible approach to use the subject to indicate some sort of >>>> logical category and then have the broker be configured to 'route' >>>> messages >>>> according to that logical category. >>>> >>> >>> I think that's one choice you could make, certainly. I just think it's a >>> bad choice for the general case. >>> >> > You also appeared to be implying that the definitions of the 'to' and > 'subject' fields in the specification backed this view up. That's where I > disagreed with you. > > I can accept that using the subject may not be the best approach for other > reasons, i.e. that it is wrong. What I objected to is the notion that it is > *obviously* wrong based on a reading of the specification and therefore > somehow not really AMQP 1.0. To be honest I was surprised at the definition of subject when I reread it as I expected it (from my woolly memory of these things) to more obviously support the notion of it as a primary routing attributes. It is very likely that you have a better memory than me and thus were less surprised at the definition :-) > > > And indeed originally I was very much of the >> opinion that subject was a surrogate for the routing-key in 0.10 (which is >> why I originally implemented filters in that way). >> > > I think those legacy filters turned out to be a mistake. I quite agree > that a convention around the address (either of the source/target, or of > the 'to' field on the message) leads to a simpler (yet also more flexible > and powerful) solution for the use cases the direct and topic exchanges > were intended to support. > > Yes - probably my fault :-( > The description in the spec for the 'to' field is again in hindsight not a > good one (not entirely sure its the best choice of name either), and it may > indeed have been better to leave the subject field out entirely. > Also quite possibly my fault :-( Agreed on all points though. > > [...] > > However I think the potentially >> more contentious question is actually message translation. >> > > I doubt it's that contentious :-) > > > Behaviour of >> exchanges can be considered a property of a given exchange/node/address >> whatever you want to call it. Message translation is externally visible >> and obviously we should be striving to have commonality there. Given an >> AMQP 1.0 message how does one translate that into an AMQP 0-9-1 or 0-10 >> message (along with their associated delivery headers). In particular for >> reply to... I am translating an AMQP 0-10 exchange + routing-key combo >> into >> and AMQP 1.0 address of "exchange/routing-key" ... How does the C++ broker >> translate the replyTo address? >> > > It does the same thing. > > I've actually described the mapping for the qpid::messaging API and the > c++ brokers behaviours onto 1.0 on this list in past threads and in a > readme: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/AMQP_1.0? > view=markup. > > Obviously I think this is a sensible mapping... but the issue here is that the reply to in a 0.x sense may not work as expected if the 1.0 user happens to innocently set the subject of their reply message to, say, "I like tomatoes". That is an 0.x client sends a message with reply-to exchange: foo , routing-key: bar ... this message is received by an AMQP 1.0 client which sees the reply to as "foo/bar". A reply message is sent and it is routed at the foo exchange... but because the message happens to be about the senders love of tomatoes, the message will never reach the intended destination because subject is used in preference to the (parsed) to address. > My hope in doing so was that it would allow others to comment and > criticise the choices made, suggesting alternatives or enhancements (indeed > Fraser's feedback was very valuable) and that this would encourage more > open analysis and discussion around AMQP 1.0 extended semantics which I > feel is sorely lacking. Sadly this failed. > > Think of it as delayed success... I think a lot of discussion will sadly, but necessarily, only happen as people stumble upon actual issues -- Rob > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
