camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gert Vanthienen <>
Subject Re: What If JBI sendSync() Never Returns?
Date Mon, 23 Mar 2009 12:11:43 GMT

When sending a JBI MessageExchange to another JBI endpoint from Camel,
the servicemix-camel component will the same messaging style as is
used in the Camel route.  If your Camel route contains e.g. a seda:
endpoint, Camel will start using async messaging and it will also use
an async JBI MessageExchange to communicate with the JBI NMR.  This
still doesn't handle the use case where the service fails to respond
at all (although it will usually not hang, it's far more likely to
return an Error status).

However, your suggestion for improving the Camel component to allow
sync messaging with a message timeout is a very interesting one, so
we'd really appreciate a JIRA issue for it at  Since you
obviously know your way around the source code, don't hesitate to try
doing a patch -- just let us know if you need any help...


Gert Vanthienen
Open Source SOA:

2009/3/20 Bob Pollack <>:
> Does anyone know of a way to set a timer for JBI endpoints? If I make a
> request of a JBI service (by something like to ("jbi:endpoint:foo"), the
> call to the JBI endpoint seems to be made as DeliveryChannel.sendSync
> (message), with no timeout. If the target JBI service doesn't respond (let's
> say it crashes), the Camel route seems to hang forever.
> When I look at the code, the JBI call seems to be done by
> org.apache.servicemix.common.endpoints.SimpleEndpoint, which doesn't even
> contain a sendSync() call with a timeout. So I conclude that there's no way
> for Camel to ask for one.
> Should this be submitted as an enhancement request? (If so, can someone tell
> me where?) Or does someone have a Camel workaround or a Java thread
> solution?
> (This is related to
> a similar problem  that has already been posted here. But the previous
> problem concerned a JBI-JMS interaction that appears to have been solved by
> changing the JMS logic. I'm interested in a solution that gives me some kind
> of timeout when the target JBI component fails to respond for any reason
> whatsoever.)
> Thanks in advance to anyone who can help.
> --
> View this message in context:
> Sent from the Camel - Users (activemq) mailing list archive at

View raw message