You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Chris Richardson <ch...@lmco.com> on 2009/02/23 21:28:45 UTC
RemoteServiceMixClient jms endpoint synchronization problem
Using 3.4.0
I occasionally receive the "Could not find route for exchange: InOut" error
message when using the RemoteServiceMixClient to talk to a jms endpoint.
After turning up the logging levels, I can see that all of my jms endpoints
are being synced to the RemoteServiceMixClient context. However, on the
occasions when I receive the error above, it looks like the
RemoteServiceMixClient has not yet finished adding the remote endpoints
prior to my call to client.sendSync().
For example, if i wanted to send a message to Service3...
My log appears like the following:
[ActiveMQ Session Task] DEBUG org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow
- ID-10-2-1-78-11fb4a81b80-5-0: adding remote endpoint:
ServiceEndpoint[service=(urn:test}Service1,endpoint=endpoint]
[ActiveMQ Session Task] DEBUG org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow
- ID-10-2-1-78-11fb4a81b80-5-0: adding remote endpoint:
ServiceEndpoint[service=(urn:test}Service2,endpoint=endpoint]
[main] WARN org.apache.servicemix.jbi.nmr.DefaultBroker - ServiceName
({urn:test}Service3) specified for routing but can't find it registered
Could not find route for exchange: InOut[
....
service: {urn:test}Service3
...
[ActiveMQ Session Task] DEBUG org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow
- ID-10-2-1-78-11fb4a81b80-5-0: adding remote endpoint:
ServiceEndpoint[service=(urn:test}Service3,endpoint=endpoint]
I've confirmed this by listing the endpoints in the context after the call
to client.start(). When I have trouble, the endpoint that i'm looking for
is not yet in the ComponentContext.getEndpoints().
All of that said, what is the proper way to wait for the full
RemoteServiceMixClient initilization ?
I tried using the getCurrentStatus on the parent class (along with isStarted
and isInitialized), but none of these are providing me with a reliable way
to determine if my remote endpoint has been added.
The only other thing i can think of is polling the endpoint listing for the
endpoint that's of interest. However, then I would have to implement my own
time out, etc for determining if an endpoint does not actually exist.
Thank you for any recommendations.
Chris
--
View this message in context: http://www.nabble.com/RemoteServiceMixClient-jms-endpoint-synchronization-problem-tp22169440p22169440.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: RemoteServiceMixClient jms endpoint synchronization problem
Posted by Gert Vanthienen <ge...@gmail.com>.
Chris,
Seems like you have at least some kind of idea as to how you would
like to see this implemented, so feel free to open a JIRA and let us
know what you want.
BTW, also feel free to express your suggestions in a little patch
file, we really love those ;)
Regards,
Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
2009/2/26 Chris Richardson <ch...@lmco.com>:
>
> Thanks for the response Gert.
>
> I've moved to using the HTTP client with a rule for routing.
>
> The only way I could think of to make this happen in the remote client is to
> continue checking for the desired endpoint until the given timeout is met on
> the sendsync call. If the timeout is met and the endpoint has still not
> been found then the "Could not find route.." error message could be thrown.
> This would be rather than the current method of throwing the "Could not find
> route.." error immediately from sendsync when the remote client does not
> know about the endpoint. Although, with this it may be harder to
> distinguish between a network/communication error and a missing endpoint.
>
> Chris
>
>
> Gert Vanthienen wrote:
>>
>> Chris,
>>
>> You're probably right about the RemoteServiceMixClient not yet having
>> received all the information from the other container. Not sure if
>> there's a way we can solve this generically -- I don't see a real way
>> to know which endpoints we should have received. We might be able to
>> improve the RemoteServiceMixClient's send methods to retry the
>> MessageExchange if it fails for this reason (an endpoint not being
>> registered) on the first attempt. Feel free to raise a JIRA issue to
>> have this investigated...
>>
>> Another option, but I don't know if it would work in your use case,
>> would be to avoid the use of the RemoteServiceMixClient alltogether
>> and connect to ActiveMQ that's embedded in ServiceMix.
>>
>> Regards,
>>
>> Gert Vanthienen
>> ------------------------
>> Open Source SOA: http://fusesource.com
>> Blog: http://gertvanthienen.blogspot.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/RemoteServiceMixClient-jms-endpoint-synchronization-problem-tp22169440p22223181.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
Re: RemoteServiceMixClient jms endpoint synchronization problem
Posted by Chris Richardson <ch...@lmco.com>.
Thanks for the response Gert.
I've moved to using the HTTP client with a rule for routing.
The only way I could think of to make this happen in the remote client is to
continue checking for the desired endpoint until the given timeout is met on
the sendsync call. If the timeout is met and the endpoint has still not
been found then the "Could not find route.." error message could be thrown.
This would be rather than the current method of throwing the "Could not find
route.." error immediately from sendsync when the remote client does not
know about the endpoint. Although, with this it may be harder to
distinguish between a network/communication error and a missing endpoint.
Chris
Gert Vanthienen wrote:
>
> Chris,
>
> You're probably right about the RemoteServiceMixClient not yet having
> received all the information from the other container. Not sure if
> there's a way we can solve this generically -- I don't see a real way
> to know which endpoints we should have received. We might be able to
> improve the RemoteServiceMixClient's send methods to retry the
> MessageExchange if it fails for this reason (an endpoint not being
> registered) on the first attempt. Feel free to raise a JIRA issue to
> have this investigated...
>
> Another option, but I don't know if it would work in your use case,
> would be to avoid the use of the RemoteServiceMixClient alltogether
> and connect to ActiveMQ that's embedded in ServiceMix.
>
> Regards,
>
> Gert Vanthienen
> ------------------------
> Open Source SOA: http://fusesource.com
> Blog: http://gertvanthienen.blogspot.com/
>
>
--
View this message in context: http://www.nabble.com/RemoteServiceMixClient-jms-endpoint-synchronization-problem-tp22169440p22223181.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: RemoteServiceMixClient jms endpoint synchronization problem
Posted by Gert Vanthienen <ge...@gmail.com>.
Chris,
You're probably right about the RemoteServiceMixClient not yet having
received all the information from the other container. Not sure if
there's a way we can solve this generically -- I don't see a real way
to know which endpoints we should have received. We might be able to
improve the RemoteServiceMixClient's send methods to retry the
MessageExchange if it fails for this reason (an endpoint not being
registered) on the first attempt. Feel free to raise a JIRA issue to
have this investigated...
Another option, but I don't know if it would work in your use case,
would be to avoid the use of the RemoteServiceMixClient alltogether
and connect to ActiveMQ that's embedded in ServiceMix.
Regards,
Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/
2009/2/23 Chris Richardson <ch...@lmco.com>:
>
> Using 3.4.0
>
> I occasionally receive the "Could not find route for exchange: InOut" error
> message when using the RemoteServiceMixClient to talk to a jms endpoint.
> After turning up the logging levels, I can see that all of my jms endpoints
> are being synced to the RemoteServiceMixClient context. However, on the
> occasions when I receive the error above, it looks like the
> RemoteServiceMixClient has not yet finished adding the remote endpoints
> prior to my call to client.sendSync().
>
> For example, if i wanted to send a message to Service3...
>
> My log appears like the following:
> [ActiveMQ Session Task] DEBUG org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow
> - ID-10-2-1-78-11fb4a81b80-5-0: adding remote endpoint:
> ServiceEndpoint[service=(urn:test}Service1,endpoint=endpoint]
>
> [ActiveMQ Session Task] DEBUG org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow
> - ID-10-2-1-78-11fb4a81b80-5-0: adding remote endpoint:
> ServiceEndpoint[service=(urn:test}Service2,endpoint=endpoint]
>
> [main] WARN org.apache.servicemix.jbi.nmr.DefaultBroker - ServiceName
> ({urn:test}Service3) specified for routing but can't find it registered
>
> Could not find route for exchange: InOut[
> ....
> service: {urn:test}Service3
>
> ...
>
> [ActiveMQ Session Task] DEBUG org.apache.servicemix.jbi.nmr.flow.jms.JMSFlow
> - ID-10-2-1-78-11fb4a81b80-5-0: adding remote endpoint:
> ServiceEndpoint[service=(urn:test}Service3,endpoint=endpoint]
>
> I've confirmed this by listing the endpoints in the context after the call
> to client.start(). When I have trouble, the endpoint that i'm looking for
> is not yet in the ComponentContext.getEndpoints().
>
> All of that said, what is the proper way to wait for the full
> RemoteServiceMixClient initilization ?
>
> I tried using the getCurrentStatus on the parent class (along with isStarted
> and isInitialized), but none of these are providing me with a reliable way
> to determine if my remote endpoint has been added.
>
> The only other thing i can think of is polling the endpoint listing for the
> endpoint that's of interest. However, then I would have to implement my own
> time out, etc for determining if an endpoint does not actually exist.
>
> Thank you for any recommendations.
> Chris
> --
> View this message in context: http://www.nabble.com/RemoteServiceMixClient-jms-endpoint-synchronization-problem-tp22169440p22169440.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>