You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by dgoodine <da...@mtvn.com> on 2007/02/19 16:59:30 UTC

MessageExchange equality

In my service engine, I'm caching information related to a message exchange,
so I want to use the exchange as the key in a hashmap.  This works fine
under SEDA flow, but breaks under JMS (which I'll need in production for
persistence), as a different object representing the same exchange is
returned.

The question is, would it be possible to return the same MessageExchange
object to the consumer?  I know I can hash on the ID, but it would make
sense (and be more efficient) if the returned MessageExchange was == to the
outbound ME.  It's going to break programs if people rely on the equality of
the SEDA flow, and then try to move to JMS.


-- 
View this message in context: http://www.nabble.com/MessageExchange-equality-tf3253596s12049.html#a9044547
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: MessageExchange equality

Posted by dgoodine <da...@mtvn.com>.
Nevermind.  I just realized what the implications would be to implement that
for deserialization of MEs.  It's best for the implementations of the
services to handle that.


dgoodine wrote:
> 
> In my service engine, I'm caching information related to a message
> exchange, so I want to use the exchange as the key in a hashmap.  This
> works fine under SEDA flow, but breaks under JMS (which I'll need in
> production for persistence), as a different object representing the same
> exchange is returned.
> 
> The question is, would it be possible to return the same MessageExchange
> object to the consumer?  I know I can hash on the ID, but it would make
> sense (and be more efficient) if the returned MessageExchange was == to
> the outbound ME.  It's going to break programs if people rely on the
> equality of the SEDA flow, and then try to move to JMS.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/MessageExchange-equality-tf3253596s12049.html#a9045304
Sent from the ServiceMix - User mailing list archive at Nabble.com.