Calling an InOnly endpoint with an InOut exchange...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Calling an InOnly endpoint with an InOut exchange...

Henrique Viecili
Assuming the scenario I have 2 jbi endpoints:

- 'jbi:myInOutEndpoint' with MEP=InOut;
- 'jbi:myInOnlyEndpoint' with MEP=InOnly;

and the following route in camel:

<route>
  <from uri="jbi:myInOutEndpoint"/>
  <setExchangePattern pattern="InOut"/>
  (...)
  <to uri="jbi:myInOnlyEndpoint" />
  (...)
</route>


I have experienced the exchange hanging, waiting for a response to continue
after <to uri="jbi:myInOnlyEndpoint" />. And of course this is my mistake,
cause I should have properly set up the route with pattern="InOnly".

But it would be much easier to identify this mistake if at some point
(deploy time or runtime) camel would warn me about calling an InOnly
endpoint with an InOut exchange.

Is there a way to enable such warnings? Do they already exist? Where should
I start looking in camel or servicemix code to create a patch?

att.
*Henrique Viecili
*
Reply | Threaded
Open this post in threaded view
|

Re: Calling an InOnly endpoint with an InOut exchange...

Charles Moulliard
Hi Henrique,

Is it mandatory that you uses the jbi endpoint component or can you interconnect your camel routes directly using direct component, ... ? As jbi will become deprecated in next releases of Apache ServiceMx, I recommend that you investigate alternatives like NMR nmr which allows to move camel objects in async mode or direct-vm for sync exchanges direct-vm.

Regards,

Charles
Apache Committer
twitter : @cmoulliard
Apache Committer / Sr. Pr. Consultant at FuseSource.com
Email: [hidden email]
Twitter : @cmoulliard, @fusenews
Blog : http://cmoulliard.blogspot.com