On 09/04/2013 03:14 PM, Alan Conway wrote:
Having a connection option that changes how messages are presented seems confusing and error prone.
I'm not sure I agree. I don't really see a problem with the behaviour being configurable. And if it is, doing so at the granularity of connection seems reasonable to me.
Can you elaborate on your concerns a little?
Is it possible to present both to the client thus avoiding the need for a configuration option? I.e. put annotations in the 1.0 nested maps _and_ in message properties,
Yes, it's possible, but the point of having them nested is so that they aren't intermingled with application properties.
If the application cared about the distinction they would then have to go through the properties, compare them against the nested annotations and assume that annotation names don't clash with application property names.
and fold the 2 together to avoid duplicates when sending messages?
When sending only the nested annotations will be sent as annotations. If these were also included as top-level properties, the library would then have to exclude any top level property with the same name as an annotation.
That way old & new code would both work without a config option.
To be clear, up until this point annotations haven't worked over 1.0, so I'm pretty sure there is no code in existence at present that relies on them being nested.
The reason for supporting both options is not to handle legacy concerns but to cater for two different use cases. One where the application doesn't care about the distinction, one where it does.
To me, the combined option satisfies neither particularly well. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
