You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Bruce Snyder <br...@gmail.com> on 2007/12/01 21:46:51 UTC

Re: Does jms-queue persist in servicemix

On Nov 14, 2007 9:58 AM, Raj@nih <yr...@gmail.com> wrote:
>
> Hi,
> I have following configuration
>   JMS BC-->EIP pipeline-->BeanSU (InOut)-->BeanSU(InOnly)
> I can see all the messages exchanges when servicemix is up and running
> I have a client to send message to JMS BC
> When ever I shut down servicemix and restart in the middle of run exchanges
> doesn't show up
> So is jms queue persistance in servicemix ?
> My eip is as follow
>
>  <eip:pipeline service="y:pipeline" endpoint="testbean">
>     <eip:transformer>
>       <eip:exchange-target service="y:bean2" />
>     </eip:transformer>
>     <eip:target>
>       <eip:exchange-target service="y:bean1" />
>     </eip:target>
>   </eip:pipeline>
>
>
> Thanks in advance for the suggestion

ServiceMix can handle failure and recovery of messages, you just need
configure the endpoints to handle this using message persistence and
transactions. In your component flow noted above, this means that you
will need to do the following:

1) Make sure that the message producer (i.e., your client) who is
sending messages to the JMS destination does so using
javax.jms.DeliveryMode.PERSISTENT
2) Use the jms:consumer instead of the jms:endpoint for your JMS
consumer BC (see
http://servicemix.apache.org/servicemix-jms-new-endpoints.html for
more information) and set transacted="jms" in the xbean.xml
3) Make sure to set the
javax.jbi.messaging.MessageExchange.JTA_TRANSACTION_PROPERTY_NAME
property from within your servicemix-bean SUs' bean class (this makes
the message exchange persistent)

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/