-
1. Re: FailOver on componentes
gnodet_gnodet Mar 13, 2008 10:20 AM (in response to fretzlaff_fretzlaff)I think the best way to achieve recovery in JBI is to use a JMS endpoint in your flow.
The way to achieve that is to put a JMS provider and a JMS consumer between your components. The JMS consumer need to be transacted so that if anything bad occur in the second component, it will be able to rollback the transaction and the message will be redelivered later.
<jms:provider service="my:qos" endpoint="provider" destinationName="my.queue" connectionFactory="#connectionFactory" /> <jms:consumer service="my:qos" endpoint="consumer" destinationName="my.queue" connectionFactory="#connectionFactory" concurrentConsumers="8" transacted="xa"></jms:consumer>
-
2. Re: FailOver on componentes
fretzlaff_fretzlaff Mar 13, 2008 11:07 AM (in response to gnodet_gnodet)Ok, but in my configuration I can have a lot of components (more than 100) and using this way I can have overhead on execution.
What I would like to do is configuring transactions as depicted at:
I did the same configuration I found in:
http://open.iona.com/docs/esb/3.3/deploy_guide/DeployESBFlowsJCA.html#DeployESBFlowsJCAExample
But I continue to lose messages on the component. I think that have another place where I need to configure anything else.
Do you know how I can do this? Or where I can find a sample configuration?
Thank's
Fabio
-
3. Re: FailOver on componentes
gnodet_gnodet Mar 13, 2008 11:27 AM (in response to fretzlaff_fretzlaff)Ok, but in my configuration I can have a lot of components (more than 100) and using this way I can have overhead on execution.
You need to understand that using the JCA flow will add much more overhead that what I briefly explained. The only downside of using explicit JMS endpoints instead of the JCA flow is that is has to be done explicitely.
What I would like to do is configuring transactions as depicted at:
I did the same configuration I found in:
http://open.iona.com/docs/esb/3.3/deploy_guide/DeployESBFlowsJCA.html#DeployESBFlowsJCAExample
Such mechanism will provide you the desired QoS but at a much higher overhead: if you use an InOut exchange, the JBI exchange will be persisted 3 times between each component. So if you have three components involved, it makes 6 JMS messages persisted.
On the other side, if you use a single transaction with a synchronous JMS consumer (which is depicted on the following picture, the message will only be persisted once, independant of the number of components involved.
But I continue to lose messages on the component. I think that have another place where I need to configure anything else.
Do you know how I can do this? Or where I can find a sample configuration?
Did you set the persistent="true" flag on the JBI container ? You can change that in the conf/servicemix.xml, on the <jbi:container/> element.
-
4. Re: FailOver on componentes
fretzlaff_fretzlaff Mar 14, 2008 1:42 PM (in response to gnodet_gnodet)You're right, I forgot to put persistent="true". Now it´s working fine. I did with JCAFlow because is more easy to change it now.
Thank you.