You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Sloan, John L (John)" <js...@avaya.com> on 2006/03/24 01:04:15 UTC

PROVIDER side way to determine CONSUMER origination of an exchange?

Is there a JBI-compliant way for a PROVIDER to
determine which CONSUMER on the bus sent a particular
message exchange? I'm tempted to say no, after peering
at the spec, perusing through the ServiceMix code, and
writing some toy code. (For the CONSUMER it's just a
matter of doing a MessageExchange.getEndpoint()).

Failing that, is there any simple ServiceMix-specific
way to do this?

Thanks for any insight!

--
John Sloan           |  email jsloan@avaya.com
Avaya Inc.           |  voice  +1 303 538 2746
1300 West 120th Ave. | office           B1-C44
Westminster CO 80234-2701 USA 


Re: PROVIDER side way to determine CONSUMER origination of an exchange?

Posted by Guillaume Nodet <gn...@gmail.com>.
The main problem is that JBI exchanges are sent by a component to an endpoint,
so using ServiceMix internals you will be able to access the consumer component,
but there is no "consumer endpoint"...
Try to cast the exchange to its implementation and access the fields
  ((MessageExchangeImpl) exchange).getSourceId()
You will get the name of the consumer component.

Cheers,
Guillaume Nodet

On 3/24/06, Sloan, John L (John) <js...@avaya.com> wrote:
>
> Is there a JBI-compliant way for a PROVIDER to
> determine which CONSUMER on the bus sent a particular
> message exchange? I'm tempted to say no, after peering
> at the spec, perusing through the ServiceMix code, and
> writing some toy code. (For the CONSUMER it's just a
> matter of doing a MessageExchange.getEndpoint()).
>
> Failing that, is there any simple ServiceMix-specific
> way to do this?
>
> Thanks for any insight!
>
> --
> John Sloan           |  email jsloan@avaya.com
> Avaya Inc.           |  voice  +1 303 538 2746
> 1300 West 120th Ave. | office           B1-C44
> Westminster CO 80234-2701 USA
>
>