You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by William Blackburn <wj...@mac.com> on 2006/05/16 20:15:49 UTC

Questions on JMSFlow/cluster configuration

I will be moving from a single deployment, SEDA flow to a cluster  
using the JMSflow. I've run the cluster example and studied up on  
ActiveMQ, My goal is as much fault tolerance as load handling,  
Configuring ActiveMQ's journaled db persistence will get me most of  
the way (I think), but I still have two remaining questions.

First, in the MQ sense, when is an message-exchange considered  
'delivered' ? For example, if I have a bunch of servicemix components  
running on a node configured as above, and I yank the power while a  
component is in the middle of an 'onMessageExchange()' what happens  
to that message? Will ActiveMQ redeliver it when the node comes back  
up? Can components influence what ActiveMQ considers 'delivered' in  
any way.

My second question is probably more an ActiveMQ one, but I hope you  
can comment anyway. We will be using a redundant database-server as  
well. Should the ActiveMQ brokers be configured to use the same  
database? Or should each have its own database?

Thanks very much in advance for any help.

B.J.

Re: Questions on JMSFlow/cluster configuration

Posted by mart <ma...@googlemail.com>.
(I correct: jms handles synchronous flow)

mart wrote:
> 
> I assume jms would not work better with FTP since it is asynchronous;
> anyway I will try to setup something else to review JMS/JCA flows.
> 
> mart wrote:
>> 
>> I don't know if this may change anything but in fact I am using the VFS
>> component. Would JMS flow work?
>> 
>> gnodet wrote:
>>> 
>>> Currently, the ftp component only send  JBI exchanges synchronously,
>>> so the JCA flow will never accept those exchanges and they will use
>>> the SEDA flow.  Of course, this should change.
>>> 
>>> On 11/3/06, mart <ma...@googlemail.com> wrote:
>>>>
>>>> This lack of documentation is confusing me as well. I have a current
>>>> workflow
>>>> that seems to use SEDA. JCA seems to be configured in the default
>>>> servicemix.xml file:
>>>>
>>>>         <sm:flows>
>>>>          <sm:sedaFlow />
>>>>           <sm:jcaFlow bootstrapContext="#bootstrapContext"
>>>>                       connectionManager="#connectionManager"
>>>>                       jmsURL="tcp://localhost:61616" />
>>>>         </sm:flows>
>>>>
>>>> How can I make my current workflow use JCA (for persistence &
>>>> reliability,
>>>> maybe clustering in the long term)? Where do I have to set up my
>>>> exchange ?
>>>>
>>>> My current workflow is ftp => drools based router => different
>>>> Transform
>>>> Component => Different destinations (mail/FTP) and I have many cases
>>>> where
>>>> my message can be lost.
>>>>
>>>> Thanks for any info.
>>>>
>>>>
>>>> gnodet wrote:
>>>> >
>>>> > Not at all.
>>>> > But do not blame yourself as this is not documented :(
>>>> > When choosing a flow, several QoS requirements will be checked:
>>>> >   * synchonous / asynchronous: if the exchange was sent using
>>>> sendSync or
>>>> > send
>>>> >   * persistent: if the message need to be peristent
>>>> >   * transactional: if the message is enlisted in an xa transaction
>>>> >   * clustered: if the destination endpoint is clustered (activated on
>>>> > another clustered jbi container)
>>>> >
>>>> > The transactional attribute can be set by setting the transaction in
>>>> the
>>>> > needed property of the exchange (
>>>> > MessageExchange.JTA_TRANSACTION_PROPERTY_NAME).  This can also be
>>>> done
>>>> > automatically by servicemix using autoEnlistInTransaction attribute
>>>> on the
>>>> > container (if an xa transaction is running, the property will be
>>>> set).
>>>> > Persistent feature may be set using the persistent attribute on the
>>>> > container, on the activation spec or on the exchange itself (
>>>> > org.apache.servicemix.JbiConstants.PERSISTENT_PROPERTY_NAME).
>>>> >
>>>> > Each flow will check if it can fullfill the needed requirements, and
>>>> the
>>>> > first flow to answer yes will be used (this can be customized).
>>>> > For example, the jms flow will reject any transactional exchange,
>>>> whereas
>>>> > the jca flow will reject any synchronous exchange and seda/st flow
>>>> will
>>>> > reject any persistent or clustered exchanges.
>>>> > Note that you can force the NMR to choose a given flow by using the
>>>> > JbiConstants.FLOW_PROPERTY_NAME property on the exchange.
>>>> >
>>>> > The only combination that is not handled at all by servicemix is:
>>>> > clustered
>>>> > + transactional + synchronous.
>>>> >
>>>> > However things should be improved regarding to clustering: the
>>>> seda/st
>>>> > should accept clustered exchanges if the target endpoint is also
>>>> activated
>>>> > locally.
>>>> >
>>>> > Hope this helps,
>>>> > Guillaume Nodet
>>>> >
>>>> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>>>> >>
>>>> >> Sorry, I swear this is my last post on this topic!
>>>> >>
>>>> >> Requesting a particular Q0S - is this done when creating the
>>>> >> exchange? i.e. getExchangeFactory().createInOnlyExchange() would use
>>>> >> seda by default while
>>>> getExchangeFactory().createRobustInOnlyExchange
>>>> >> () would use jca?
>>>> >>
>>>> >> B.J.
>>>> >>
>>>> >> On May 16, 2006, at 5:12 PM, Guillaume Nodet wrote:
>>>> >>
>>>> >> > Configuration is not difficult.
>>>> >> > Try something like
>>>> >> >  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"
>>>> >> >
>>>> >> > Depending on the requested QoS for the exchange, one of the flow
>>>> will
>>>> >> > be choosen.
>>>> >> > You can change the default implementation by setting the
>>>> >> > defaultFlowChooser property on the Broker -- i have just seen that
>>>> i
>>>> >> > forgot to add getter / setter :(
>>>> >> >
>>>> >> > Anyway, if you use a sendSync on jca flow, an exception should be
>>>> >> > thrown.  If you have multiple flows (including a seda / st flow),
>>>> >> > sendSync calls should use the seda flow.
>>>> >> >
>>>> >> > If your problem is the http binding, you could try using the
>>>> >> > servicemix-http component which uses send and not sendSync.
>>>> >> >
>>>> >> > Cheers,
>>>> >> > Guillaume Nodet
>>>> >> >
>>>> >> >
>>>> >> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>>>> >> >> Success! Got the JCA flow up and running - thank you very much. I
>>>> did
>>>> >> >> run into that problem with sendSync though. I use an httpBinding
>>>> >> >> component to introduce some messages. It uses sendSync
>>>> internally,
>>>> >> >> and now I get sporadic io errors when I attempt to use it.
>>>> >> >>
>>>> >> >> I may simply choose to use a jmsbinding for this message
>>>> insertion,
>>>> >> >> but you mentioned that multiple flows can be configured - does
>>>> this
>>>> >> >> mean that the httpBinding could use seda or jms, while everything
>>>> >> >> else uses jca? I haven't seen an example of this - if its not too
>>>> >> >> much trouble, could you elaborate?
>>>> >> >>
>>>> >> >> Thanks again for all your help so far.
>>>> >> >>
>>>> >> >> B.J.
>>>> >>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> > --
>>>> > Cheers,
>>>> > Guillaume Nodet
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7155558
>>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>>
>>>>
>>> 
>>> 
>>> -- 
>>> Cheers,
>>> Guillaume Nodet
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7162748
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Questions on JMSFlow/cluster configuration

Posted by mart <ma...@googlemail.com>.
I assume jms would not work better with FTP since it is asynchronous; anyway
I will try to setup something else to review JMS/JCA flows.

mart wrote:
> 
> I don't know if this may change anything but in fact I am using the VFS
> component. Would JMS flow work?
> 
> gnodet wrote:
>> 
>> Currently, the ftp component only send  JBI exchanges synchronously,
>> so the JCA flow will never accept those exchanges and they will use
>> the SEDA flow.  Of course, this should change.
>> 
>> On 11/3/06, mart <ma...@googlemail.com> wrote:
>>>
>>> This lack of documentation is confusing me as well. I have a current
>>> workflow
>>> that seems to use SEDA. JCA seems to be configured in the default
>>> servicemix.xml file:
>>>
>>>         <sm:flows>
>>>          <sm:sedaFlow />
>>>           <sm:jcaFlow bootstrapContext="#bootstrapContext"
>>>                       connectionManager="#connectionManager"
>>>                       jmsURL="tcp://localhost:61616" />
>>>         </sm:flows>
>>>
>>> How can I make my current workflow use JCA (for persistence &
>>> reliability,
>>> maybe clustering in the long term)? Where do I have to set up my
>>> exchange ?
>>>
>>> My current workflow is ftp => drools based router => different Transform
>>> Component => Different destinations (mail/FTP) and I have many cases
>>> where
>>> my message can be lost.
>>>
>>> Thanks for any info.
>>>
>>>
>>> gnodet wrote:
>>> >
>>> > Not at all.
>>> > But do not blame yourself as this is not documented :(
>>> > When choosing a flow, several QoS requirements will be checked:
>>> >   * synchonous / asynchronous: if the exchange was sent using sendSync
>>> or
>>> > send
>>> >   * persistent: if the message need to be peristent
>>> >   * transactional: if the message is enlisted in an xa transaction
>>> >   * clustered: if the destination endpoint is clustered (activated on
>>> > another clustered jbi container)
>>> >
>>> > The transactional attribute can be set by setting the transaction in
>>> the
>>> > needed property of the exchange (
>>> > MessageExchange.JTA_TRANSACTION_PROPERTY_NAME).  This can also be done
>>> > automatically by servicemix using autoEnlistInTransaction attribute on
>>> the
>>> > container (if an xa transaction is running, the property will be set).
>>> > Persistent feature may be set using the persistent attribute on the
>>> > container, on the activation spec or on the exchange itself (
>>> > org.apache.servicemix.JbiConstants.PERSISTENT_PROPERTY_NAME).
>>> >
>>> > Each flow will check if it can fullfill the needed requirements, and
>>> the
>>> > first flow to answer yes will be used (this can be customized).
>>> > For example, the jms flow will reject any transactional exchange,
>>> whereas
>>> > the jca flow will reject any synchronous exchange and seda/st flow
>>> will
>>> > reject any persistent or clustered exchanges.
>>> > Note that you can force the NMR to choose a given flow by using the
>>> > JbiConstants.FLOW_PROPERTY_NAME property on the exchange.
>>> >
>>> > The only combination that is not handled at all by servicemix is:
>>> > clustered
>>> > + transactional + synchronous.
>>> >
>>> > However things should be improved regarding to clustering: the seda/st
>>> > should accept clustered exchanges if the target endpoint is also
>>> activated
>>> > locally.
>>> >
>>> > Hope this helps,
>>> > Guillaume Nodet
>>> >
>>> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>>> >>
>>> >> Sorry, I swear this is my last post on this topic!
>>> >>
>>> >> Requesting a particular Q0S - is this done when creating the
>>> >> exchange? i.e. getExchangeFactory().createInOnlyExchange() would use
>>> >> seda by default while getExchangeFactory().createRobustInOnlyExchange
>>> >> () would use jca?
>>> >>
>>> >> B.J.
>>> >>
>>> >> On May 16, 2006, at 5:12 PM, Guillaume Nodet wrote:
>>> >>
>>> >> > Configuration is not difficult.
>>> >> > Try something like
>>> >> >  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"
>>> >> >
>>> >> > Depending on the requested QoS for the exchange, one of the flow
>>> will
>>> >> > be choosen.
>>> >> > You can change the default implementation by setting the
>>> >> > defaultFlowChooser property on the Broker -- i have just seen that
>>> i
>>> >> > forgot to add getter / setter :(
>>> >> >
>>> >> > Anyway, if you use a sendSync on jca flow, an exception should be
>>> >> > thrown.  If you have multiple flows (including a seda / st flow),
>>> >> > sendSync calls should use the seda flow.
>>> >> >
>>> >> > If your problem is the http binding, you could try using the
>>> >> > servicemix-http component which uses send and not sendSync.
>>> >> >
>>> >> > Cheers,
>>> >> > Guillaume Nodet
>>> >> >
>>> >> >
>>> >> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>>> >> >> Success! Got the JCA flow up and running - thank you very much. I
>>> did
>>> >> >> run into that problem with sendSync though. I use an httpBinding
>>> >> >> component to introduce some messages. It uses sendSync internally,
>>> >> >> and now I get sporadic io errors when I attempt to use it.
>>> >> >>
>>> >> >> I may simply choose to use a jmsbinding for this message
>>> insertion,
>>> >> >> but you mentioned that multiple flows can be configured - does
>>> this
>>> >> >> mean that the httpBinding could use seda or jms, while everything
>>> >> >> else uses jca? I haven't seen an example of this - if its not too
>>> >> >> much trouble, could you elaborate?
>>> >> >>
>>> >> >> Thanks again for all your help so far.
>>> >> >>
>>> >> >> B.J.
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Cheers,
>>> > Guillaume Nodet
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7155558
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Cheers,
>> Guillaume Nodet
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7160634
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Questions on JMSFlow/cluster configuration

Posted by mart <ma...@googlemail.com>.
I don't know if this may change anything but in fact I am using the VFS
component. Would JMS flow work?

gnodet wrote:
> 
> Currently, the ftp component only send  JBI exchanges synchronously,
> so the JCA flow will never accept those exchanges and they will use
> the SEDA flow.  Of course, this should change.
> 
> On 11/3/06, mart <ma...@googlemail.com> wrote:
>>
>> This lack of documentation is confusing me as well. I have a current
>> workflow
>> that seems to use SEDA. JCA seems to be configured in the default
>> servicemix.xml file:
>>
>>         <sm:flows>
>>          <sm:sedaFlow />
>>           <sm:jcaFlow bootstrapContext="#bootstrapContext"
>>                       connectionManager="#connectionManager"
>>                       jmsURL="tcp://localhost:61616" />
>>         </sm:flows>
>>
>> How can I make my current workflow use JCA (for persistence &
>> reliability,
>> maybe clustering in the long term)? Where do I have to set up my exchange
>> ?
>>
>> My current workflow is ftp => drools based router => different Transform
>> Component => Different destinations (mail/FTP) and I have many cases
>> where
>> my message can be lost.
>>
>> Thanks for any info.
>>
>>
>> gnodet wrote:
>> >
>> > Not at all.
>> > But do not blame yourself as this is not documented :(
>> > When choosing a flow, several QoS requirements will be checked:
>> >   * synchonous / asynchronous: if the exchange was sent using sendSync
>> or
>> > send
>> >   * persistent: if the message need to be peristent
>> >   * transactional: if the message is enlisted in an xa transaction
>> >   * clustered: if the destination endpoint is clustered (activated on
>> > another clustered jbi container)
>> >
>> > The transactional attribute can be set by setting the transaction in
>> the
>> > needed property of the exchange (
>> > MessageExchange.JTA_TRANSACTION_PROPERTY_NAME).  This can also be done
>> > automatically by servicemix using autoEnlistInTransaction attribute on
>> the
>> > container (if an xa transaction is running, the property will be set).
>> > Persistent feature may be set using the persistent attribute on the
>> > container, on the activation spec or on the exchange itself (
>> > org.apache.servicemix.JbiConstants.PERSISTENT_PROPERTY_NAME).
>> >
>> > Each flow will check if it can fullfill the needed requirements, and
>> the
>> > first flow to answer yes will be used (this can be customized).
>> > For example, the jms flow will reject any transactional exchange,
>> whereas
>> > the jca flow will reject any synchronous exchange and seda/st flow will
>> > reject any persistent or clustered exchanges.
>> > Note that you can force the NMR to choose a given flow by using the
>> > JbiConstants.FLOW_PROPERTY_NAME property on the exchange.
>> >
>> > The only combination that is not handled at all by servicemix is:
>> > clustered
>> > + transactional + synchronous.
>> >
>> > However things should be improved regarding to clustering: the seda/st
>> > should accept clustered exchanges if the target endpoint is also
>> activated
>> > locally.
>> >
>> > Hope this helps,
>> > Guillaume Nodet
>> >
>> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>> >>
>> >> Sorry, I swear this is my last post on this topic!
>> >>
>> >> Requesting a particular Q0S - is this done when creating the
>> >> exchange? i.e. getExchangeFactory().createInOnlyExchange() would use
>> >> seda by default while getExchangeFactory().createRobustInOnlyExchange
>> >> () would use jca?
>> >>
>> >> B.J.
>> >>
>> >> On May 16, 2006, at 5:12 PM, Guillaume Nodet wrote:
>> >>
>> >> > Configuration is not difficult.
>> >> > Try something like
>> >> >  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"
>> >> >
>> >> > Depending on the requested QoS for the exchange, one of the flow
>> will
>> >> > be choosen.
>> >> > You can change the default implementation by setting the
>> >> > defaultFlowChooser property on the Broker -- i have just seen that i
>> >> > forgot to add getter / setter :(
>> >> >
>> >> > Anyway, if you use a sendSync on jca flow, an exception should be
>> >> > thrown.  If you have multiple flows (including a seda / st flow),
>> >> > sendSync calls should use the seda flow.
>> >> >
>> >> > If your problem is the http binding, you could try using the
>> >> > servicemix-http component which uses send and not sendSync.
>> >> >
>> >> > Cheers,
>> >> > Guillaume Nodet
>> >> >
>> >> >
>> >> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>> >> >> Success! Got the JCA flow up and running - thank you very much. I
>> did
>> >> >> run into that problem with sendSync though. I use an httpBinding
>> >> >> component to introduce some messages. It uses sendSync internally,
>> >> >> and now I get sporadic io errors when I attempt to use it.
>> >> >>
>> >> >> I may simply choose to use a jmsbinding for this message insertion,
>> >> >> but you mentioned that multiple flows can be configured - does this
>> >> >> mean that the httpBinding could use seda or jms, while everything
>> >> >> else uses jca? I haven't seen an example of this - if its not too
>> >> >> much trouble, could you elaborate?
>> >> >>
>> >> >> Thanks again for all your help so far.
>> >> >>
>> >> >> B.J.
>> >>
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7155558
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7157841
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Questions on JMSFlow/cluster configuration

Posted by Guillaume Nodet <gn...@gmail.com>.
Currently, the ftp component only send  JBI exchanges synchronously,
so the JCA flow will never accept those exchanges and they will use
the SEDA flow.  Of course, this should change.

On 11/3/06, mart <ma...@googlemail.com> wrote:
>
> This lack of documentation is confusing me as well. I have a current workflow
> that seems to use SEDA. JCA seems to be configured in the default
> servicemix.xml file:
>
>         <sm:flows>
>          <sm:sedaFlow />
>           <sm:jcaFlow bootstrapContext="#bootstrapContext"
>                       connectionManager="#connectionManager"
>                       jmsURL="tcp://localhost:61616" />
>         </sm:flows>
>
> How can I make my current workflow use JCA (for persistence & reliability,
> maybe clustering in the long term)? Where do I have to set up my exchange ?
>
> My current workflow is ftp => drools based router => different Transform
> Component => Different destinations (mail/FTP) and I have many cases where
> my message can be lost.
>
> Thanks for any info.
>
>
> gnodet wrote:
> >
> > Not at all.
> > But do not blame yourself as this is not documented :(
> > When choosing a flow, several QoS requirements will be checked:
> >   * synchonous / asynchronous: if the exchange was sent using sendSync or
> > send
> >   * persistent: if the message need to be peristent
> >   * transactional: if the message is enlisted in an xa transaction
> >   * clustered: if the destination endpoint is clustered (activated on
> > another clustered jbi container)
> >
> > The transactional attribute can be set by setting the transaction in the
> > needed property of the exchange (
> > MessageExchange.JTA_TRANSACTION_PROPERTY_NAME).  This can also be done
> > automatically by servicemix using autoEnlistInTransaction attribute on the
> > container (if an xa transaction is running, the property will be set).
> > Persistent feature may be set using the persistent attribute on the
> > container, on the activation spec or on the exchange itself (
> > org.apache.servicemix.JbiConstants.PERSISTENT_PROPERTY_NAME).
> >
> > Each flow will check if it can fullfill the needed requirements, and the
> > first flow to answer yes will be used (this can be customized).
> > For example, the jms flow will reject any transactional exchange, whereas
> > the jca flow will reject any synchronous exchange and seda/st flow will
> > reject any persistent or clustered exchanges.
> > Note that you can force the NMR to choose a given flow by using the
> > JbiConstants.FLOW_PROPERTY_NAME property on the exchange.
> >
> > The only combination that is not handled at all by servicemix is:
> > clustered
> > + transactional + synchronous.
> >
> > However things should be improved regarding to clustering: the seda/st
> > should accept clustered exchanges if the target endpoint is also activated
> > locally.
> >
> > Hope this helps,
> > Guillaume Nodet
> >
> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
> >>
> >> Sorry, I swear this is my last post on this topic!
> >>
> >> Requesting a particular Q0S - is this done when creating the
> >> exchange? i.e. getExchangeFactory().createInOnlyExchange() would use
> >> seda by default while getExchangeFactory().createRobustInOnlyExchange
> >> () would use jca?
> >>
> >> B.J.
> >>
> >> On May 16, 2006, at 5:12 PM, Guillaume Nodet wrote:
> >>
> >> > Configuration is not difficult.
> >> > Try something like
> >> >  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"
> >> >
> >> > Depending on the requested QoS for the exchange, one of the flow will
> >> > be choosen.
> >> > You can change the default implementation by setting the
> >> > defaultFlowChooser property on the Broker -- i have just seen that i
> >> > forgot to add getter / setter :(
> >> >
> >> > Anyway, if you use a sendSync on jca flow, an exception should be
> >> > thrown.  If you have multiple flows (including a seda / st flow),
> >> > sendSync calls should use the seda flow.
> >> >
> >> > If your problem is the http binding, you could try using the
> >> > servicemix-http component which uses send and not sendSync.
> >> >
> >> > Cheers,
> >> > Guillaume Nodet
> >> >
> >> >
> >> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
> >> >> Success! Got the JCA flow up and running - thank you very much. I did
> >> >> run into that problem with sendSync though. I use an httpBinding
> >> >> component to introduce some messages. It uses sendSync internally,
> >> >> and now I get sporadic io errors when I attempt to use it.
> >> >>
> >> >> I may simply choose to use a jmsbinding for this message insertion,
> >> >> but you mentioned that multiple flows can be configured - does this
> >> >> mean that the httpBinding could use seda or jms, while everything
> >> >> else uses jca? I haven't seen an example of this - if its not too
> >> >> much trouble, could you elaborate?
> >> >>
> >> >> Thanks again for all your help so far.
> >> >>
> >> >> B.J.
> >>
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7155558
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Questions on JMSFlow/cluster configuration

Posted by mart <ma...@googlemail.com>.
This lack of documentation is confusing me as well. I have a current workflow
that seems to use SEDA. JCA seems to be configured in the default
servicemix.xml file:

        <sm:flows>
         <sm:sedaFlow /> 
          <sm:jcaFlow bootstrapContext="#bootstrapContext"
                      connectionManager="#connectionManager"
                      jmsURL="tcp://localhost:61616" />
        </sm:flows>

How can I make my current workflow use JCA (for persistence & reliability,
maybe clustering in the long term)? Where do I have to set up my exchange ?

My current workflow is ftp => drools based router => different Transform
Component => Different destinations (mail/FTP) and I have many cases where
my message can be lost.

Thanks for any info.


gnodet wrote:
> 
> Not at all.
> But do not blame yourself as this is not documented :(
> When choosing a flow, several QoS requirements will be checked:
>   * synchonous / asynchronous: if the exchange was sent using sendSync or
> send
>   * persistent: if the message need to be peristent
>   * transactional: if the message is enlisted in an xa transaction
>   * clustered: if the destination endpoint is clustered (activated on
> another clustered jbi container)
> 
> The transactional attribute can be set by setting the transaction in the
> needed property of the exchange (
> MessageExchange.JTA_TRANSACTION_PROPERTY_NAME).  This can also be done
> automatically by servicemix using autoEnlistInTransaction attribute on the
> container (if an xa transaction is running, the property will be set).
> Persistent feature may be set using the persistent attribute on the
> container, on the activation spec or on the exchange itself (
> org.apache.servicemix.JbiConstants.PERSISTENT_PROPERTY_NAME).
> 
> Each flow will check if it can fullfill the needed requirements, and the
> first flow to answer yes will be used (this can be customized).
> For example, the jms flow will reject any transactional exchange, whereas
> the jca flow will reject any synchronous exchange and seda/st flow will
> reject any persistent or clustered exchanges.
> Note that you can force the NMR to choose a given flow by using the
> JbiConstants.FLOW_PROPERTY_NAME property on the exchange.
> 
> The only combination that is not handled at all by servicemix is:
> clustered
> + transactional + synchronous.
> 
> However things should be improved regarding to clustering: the seda/st
> should accept clustered exchanges if the target endpoint is also activated
> locally.
> 
> Hope this helps,
> Guillaume Nodet
> 
> On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>>
>> Sorry, I swear this is my last post on this topic!
>>
>> Requesting a particular Q0S - is this done when creating the
>> exchange? i.e. getExchangeFactory().createInOnlyExchange() would use
>> seda by default while getExchangeFactory().createRobustInOnlyExchange
>> () would use jca?
>>
>> B.J.
>>
>> On May 16, 2006, at 5:12 PM, Guillaume Nodet wrote:
>>
>> > Configuration is not difficult.
>> > Try something like
>> >  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"
>> >
>> > Depending on the requested QoS for the exchange, one of the flow will
>> > be choosen.
>> > You can change the default implementation by setting the
>> > defaultFlowChooser property on the Broker -- i have just seen that i
>> > forgot to add getter / setter :(
>> >
>> > Anyway, if you use a sendSync on jca flow, an exception should be
>> > thrown.  If you have multiple flows (including a seda / st flow),
>> > sendSync calls should use the seda flow.
>> >
>> > If your problem is the http binding, you could try using the
>> > servicemix-http component which uses send and not sendSync.
>> >
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>> >> Success! Got the JCA flow up and running - thank you very much. I did
>> >> run into that problem with sendSync though. I use an httpBinding
>> >> component to introduce some messages. It uses sendSync internally,
>> >> and now I get sporadic io errors when I attempt to use it.
>> >>
>> >> I may simply choose to use a jmsbinding for this message insertion,
>> >> but you mentioned that multiple flows can be configured - does this
>> >> mean that the httpBinding could use seda or jms, while everything
>> >> else uses jca? I haven't seen an example of this - if its not too
>> >> much trouble, could you elaborate?
>> >>
>> >> Thanks again for all your help so far.
>> >>
>> >> B.J.
>>
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/Questions-on-JMSFlow-cluster-configuration-tf1630154s12049.html#a7155558
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Questions on JMSFlow/cluster configuration

Posted by Guillaume Nodet <gn...@gmail.com>.
Not at all.
But do not blame yourself as this is not documented :(
When choosing a flow, several QoS requirements will be checked:
  * synchonous / asynchronous: if the exchange was sent using sendSync or
send
  * persistent: if the message need to be peristent
  * transactional: if the message is enlisted in an xa transaction
  * clustered: if the destination endpoint is clustered (activated on
another clustered jbi container)

The transactional attribute can be set by setting the transaction in the
needed property of the exchange (
MessageExchange.JTA_TRANSACTION_PROPERTY_NAME).  This can also be done
automatically by servicemix using autoEnlistInTransaction attribute on the
container (if an xa transaction is running, the property will be set).
Persistent feature may be set using the persistent attribute on the
container, on the activation spec or on the exchange itself (
org.apache.servicemix.JbiConstants.PERSISTENT_PROPERTY_NAME).

Each flow will check if it can fullfill the needed requirements, and the
first flow to answer yes will be used (this can be customized).
For example, the jms flow will reject any transactional exchange, whereas
the jca flow will reject any synchronous exchange and seda/st flow will
reject any persistent or clustered exchanges.
Note that you can force the NMR to choose a given flow by using the
JbiConstants.FLOW_PROPERTY_NAME property on the exchange.

The only combination that is not handled at all by servicemix is: clustered
+ transactional + synchronous.

However things should be improved regarding to clustering: the seda/st
should accept clustered exchanges if the target endpoint is also activated
locally.

Hope this helps,
Guillaume Nodet

On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>
> Sorry, I swear this is my last post on this topic!
>
> Requesting a particular Q0S - is this done when creating the
> exchange? i.e. getExchangeFactory().createInOnlyExchange() would use
> seda by default while getExchangeFactory().createRobustInOnlyExchange
> () would use jca?
>
> B.J.
>
> On May 16, 2006, at 5:12 PM, Guillaume Nodet wrote:
>
> > Configuration is not difficult.
> > Try something like
> >  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"
> >
> > Depending on the requested QoS for the exchange, one of the flow will
> > be choosen.
> > You can change the default implementation by setting the
> > defaultFlowChooser property on the Broker -- i have just seen that i
> > forgot to add getter / setter :(
> >
> > Anyway, if you use a sendSync on jca flow, an exception should be
> > thrown.  If you have multiple flows (including a seda / st flow),
> > sendSync calls should use the seda flow.
> >
> > If your problem is the http binding, you could try using the
> > servicemix-http component which uses send and not sendSync.
> >
> > Cheers,
> > Guillaume Nodet
> >
> >
> > On 5/17/06, William Blackburn <wj...@mac.com> wrote:
> >> Success! Got the JCA flow up and running - thank you very much. I did
> >> run into that problem with sendSync though. I use an httpBinding
> >> component to introduce some messages. It uses sendSync internally,
> >> and now I get sporadic io errors when I attempt to use it.
> >>
> >> I may simply choose to use a jmsbinding for this message insertion,
> >> but you mentioned that multiple flows can be configured - does this
> >> mean that the httpBinding could use seda or jms, while everything
> >> else uses jca? I haven't seen an example of this - if its not too
> >> much trouble, could you elaborate?
> >>
> >> Thanks again for all your help so far.
> >>
> >> B.J.
>
>
>


-- 
Cheers,
Guillaume Nodet

Re: Questions on JMSFlow/cluster configuration

Posted by William Blackburn <wj...@mac.com>.
Sorry, I swear this is my last post on this topic!

Requesting a particular Q0S - is this done when creating the  
exchange? i.e. getExchangeFactory().createInOnlyExchange() would use  
seda by default while getExchangeFactory().createRobustInOnlyExchange 
() would use jca?

B.J.

On May 16, 2006, at 5:12 PM, Guillaume Nodet wrote:

> Configuration is not difficult.
> Try something like
>  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"
>
> Depending on the requested QoS for the exchange, one of the flow will
> be choosen.
> You can change the default implementation by setting the
> defaultFlowChooser property on the Broker -- i have just seen that i
> forgot to add getter / setter :(
>
> Anyway, if you use a sendSync on jca flow, an exception should be
> thrown.  If you have multiple flows (including a seda / st flow),
> sendSync calls should use the seda flow.
>
> If your problem is the http binding, you could try using the
> servicemix-http component which uses send and not sendSync.
>
> Cheers,
> Guillaume Nodet
>
>
> On 5/17/06, William Blackburn <wj...@mac.com> wrote:
>> Success! Got the JCA flow up and running - thank you very much. I did
>> run into that problem with sendSync though. I use an httpBinding
>> component to introduce some messages. It uses sendSync internally,
>> and now I get sporadic io errors when I attempt to use it.
>>
>> I may simply choose to use a jmsbinding for this message insertion,
>> but you mentioned that multiple flows can be configured - does this
>> mean that the httpBinding could use seda or jms, while everything
>> else uses jca? I haven't seen an example of this - if its not too
>> much trouble, could you elaborate?
>>
>> Thanks again for all your help so far.
>>
>> B.J.


Re: Questions on JMSFlow/cluster configuration

Posted by Guillaume Nodet <gn...@gmail.com>.
Configuration is not difficult.
Try something like
  <sm:container flowNames="seda,jca?jmsURL=tcp://localhost:61616"

Depending on the requested QoS for the exchange, one of the flow will
be choosen.
You can change the default implementation by setting the
defaultFlowChooser property on the Broker -- i have just seen that i
forgot to add getter / setter :(

Anyway, if you use a sendSync on jca flow, an exception should be
thrown.  If you have multiple flows (including a seda / st flow),
sendSync calls should use the seda flow.

If your problem is the http binding, you could try using the
servicemix-http component which uses send and not sendSync.

Cheers,
Guillaume Nodet


On 5/17/06, William Blackburn <wj...@mac.com> wrote:
> Success! Got the JCA flow up and running - thank you very much. I did
> run into that problem with sendSync though. I use an httpBinding
> component to introduce some messages. It uses sendSync internally,
> and now I get sporadic io errors when I attempt to use it.
>
> I may simply choose to use a jmsbinding for this message insertion,
> but you mentioned that multiple flows can be configured - does this
> mean that the httpBinding could use seda or jms, while everything
> else uses jca? I haven't seen an example of this - if its not too
> much trouble, could you elaborate?
>
> Thanks again for all your help so far.
>
> B.J.
>
>
>
> On May 16, 2006, at 2:02 PM, Guillaume Nodet wrote:
>
> > On 5/16/06, William Blackburn <wj...@mac.com> wrote:
> >> Guillaume,
> >>
> >> Thank you for your quick reply. Sorry to be so dense, but I just want
> >> to confirm my understanding of what you've said:
> >>
> >> If I configure jms flow only with activemq journaled db persistence,
> >> I would get recovery of message-exchanges that were 'in-flight' at
> >> the time of a server crash, but I would NOT get exchanges that had
> >> already hit a particular component, correct?
> >
> > Exactly.
> >
> >>
> >> If I configure jca flow, I will, in addition to above, be able to get
> >> exchanges that were in the middle being processed by a component at
> >> the time of the crash, yes? Is this automatic, or must my components
> >> commit or rollback the transaction? Given that I am using extensions
> >> of servicemix' ComponentSupport, how would I get access to the
> >> transaction to do so?
> >
> > The JCA flow uses jca ;)
> > So each time a jms message is received, a transaction is started and
> > the message consumption is part of the xa transaction.  The
> > transaction will be automatically commited, unless the setRollbackOnly
> > has been called on the transaction.
> > You can do that by using the
> > ((TransactionManager)
> > ComponentContext.getTransactionManager).getTransaction()
> > or
> > (Transaction) exchange.getProperty
> > (MessageExchange.JTA_TRANSACTION_PROPERTY_NAME)
> >
> > Remarks:
> >  * the jca flow does not handle sendSync because the message has to
> > be enlisted in a transaction so you may experience problems with
> > components using sendSync (note that you can also configure multiple
> > flows)
> >  * you can set the autoEnlistInTransaction attribute on the jbi
> > container to true so that all jbi exchanges will automatically be part
> > of a transaction
> >  * you should also set the persistent attribute on the jbi container
> > to true else jms messages will be sent using jms
> > DeliveryMode.NON_PERSISTENT
> >
> > Cheers,
> > Guillaume Nodet
> >
> >>
> >> Thanks again for all your help.
> >>
> >> BJ
> >>
> >> On May 16, 2006, at 11:47 AM, Guillaume Nodet wrote:
> >>
> >> > On 5/16/06, William Blackburn <wj...@mac.com> wrote:
> >> >> I will be moving from a single deployment, SEDA flow to a cluster
> >> >> using the JMSflow. I've run the cluster example and studied up on
> >> >> ActiveMQ, My goal is as much fault tolerance as load handling,
> >> >> Configuring ActiveMQ's journaled db persistence will get me
> >> most of
> >> >> the way (I think), but I still have two remaining questions.
> >> >>
> >> >> First, in the MQ sense, when is an message-exchange considered
> >> >> 'delivered' ? For example, if I have a bunch of servicemix
> >> components
> >> >> running on a node configured as above, and I yank the power
> >> while a
> >> >> component is in the middle of an 'onMessageExchange()' what
> >> happens
> >> >> to that message? Will ActiveMQ redeliver it when the node comes
> >> back
> >> >> up? Can components influence what ActiveMQ considers
> >> 'delivered' in
> >> >> any way.
> >> >
> >> > To be able to use redelivery, the flow should be able to use
> >> > acknowledgements, jms transactions or xa transactions.  Currenly
> >> there
> >> > is no callback to be able to use client acks or jms transaction, so
> >> > you will have to use xa transactions.   Note that there is no real
> >> > overhead if the jms resource is the only one enlisted in the xa
> >> > transactions.  The JCA flow provides high performance concurrent
> >> > delivery using.  The configuration is the same than for  the jms
> >> flow.
> >> >
> >> >>
> >> >> My second question is probably more an ActiveMQ one, but I hope
> >> you
> >> >> can comment anyway. We will be using a redundant database-
> >> server as
> >> >> well. Should the ActiveMQ brokers be configured to use the same
> >> >> database? Or should each have its own database?
> >> >
> >> > You should either use master / slave, or have a shared database
> >> if you
> >> > want high availability, else messages kept by a broker are not
> >> > available to other brokers, so if this one fails, the message
> >> will be
> >> > lost.
> >> >
> >> > Cheers,
> >> > Guillaume Nodet
> >> >>
> >> >> Thanks very much in advance for any help.
> >> >>
> >> >> B.J.
> >> >>
> >> >
> >> >
> >> > --
> >> > Cheers,
> >> > Guillaume Nodet
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
>
>


-- 
Cheers,
Guillaume Nodet

Re: Questions on JMSFlow/cluster configuration

Posted by William Blackburn <wj...@mac.com>.
Success! Got the JCA flow up and running - thank you very much. I did  
run into that problem with sendSync though. I use an httpBinding  
component to introduce some messages. It uses sendSync internally,  
and now I get sporadic io errors when I attempt to use it.

I may simply choose to use a jmsbinding for this message insertion,  
but you mentioned that multiple flows can be configured - does this  
mean that the httpBinding could use seda or jms, while everything  
else uses jca? I haven't seen an example of this - if its not too  
much trouble, could you elaborate?

Thanks again for all your help so far.

B.J.



On May 16, 2006, at 2:02 PM, Guillaume Nodet wrote:

> On 5/16/06, William Blackburn <wj...@mac.com> wrote:
>> Guillaume,
>>
>> Thank you for your quick reply. Sorry to be so dense, but I just want
>> to confirm my understanding of what you've said:
>>
>> If I configure jms flow only with activemq journaled db persistence,
>> I would get recovery of message-exchanges that were 'in-flight' at
>> the time of a server crash, but I would NOT get exchanges that had
>> already hit a particular component, correct?
>
> Exactly.
>
>>
>> If I configure jca flow, I will, in addition to above, be able to get
>> exchanges that were in the middle being processed by a component at
>> the time of the crash, yes? Is this automatic, or must my components
>> commit or rollback the transaction? Given that I am using extensions
>> of servicemix' ComponentSupport, how would I get access to the
>> transaction to do so?
>
> The JCA flow uses jca ;)
> So each time a jms message is received, a transaction is started and
> the message consumption is part of the xa transaction.  The
> transaction will be automatically commited, unless the setRollbackOnly
> has been called on the transaction.
> You can do that by using the
> ((TransactionManager)  
> ComponentContext.getTransactionManager).getTransaction()
> or
> (Transaction) exchange.getProperty 
> (MessageExchange.JTA_TRANSACTION_PROPERTY_NAME)
>
> Remarks:
>  * the jca flow does not handle sendSync because the message has to
> be enlisted in a transaction so you may experience problems with
> components using sendSync (note that you can also configure multiple
> flows)
>  * you can set the autoEnlistInTransaction attribute on the jbi
> container to true so that all jbi exchanges will automatically be part
> of a transaction
>  * you should also set the persistent attribute on the jbi container
> to true else jms messages will be sent using jms
> DeliveryMode.NON_PERSISTENT
>
> Cheers,
> Guillaume Nodet
>
>>
>> Thanks again for all your help.
>>
>> BJ
>>
>> On May 16, 2006, at 11:47 AM, Guillaume Nodet wrote:
>>
>> > On 5/16/06, William Blackburn <wj...@mac.com> wrote:
>> >> I will be moving from a single deployment, SEDA flow to a cluster
>> >> using the JMSflow. I've run the cluster example and studied up on
>> >> ActiveMQ, My goal is as much fault tolerance as load handling,
>> >> Configuring ActiveMQ's journaled db persistence will get me  
>> most of
>> >> the way (I think), but I still have two remaining questions.
>> >>
>> >> First, in the MQ sense, when is an message-exchange considered
>> >> 'delivered' ? For example, if I have a bunch of servicemix  
>> components
>> >> running on a node configured as above, and I yank the power  
>> while a
>> >> component is in the middle of an 'onMessageExchange()' what  
>> happens
>> >> to that message? Will ActiveMQ redeliver it when the node comes  
>> back
>> >> up? Can components influence what ActiveMQ considers  
>> 'delivered' in
>> >> any way.
>> >
>> > To be able to use redelivery, the flow should be able to use
>> > acknowledgements, jms transactions or xa transactions.  Currenly  
>> there
>> > is no callback to be able to use client acks or jms transaction, so
>> > you will have to use xa transactions.   Note that there is no real
>> > overhead if the jms resource is the only one enlisted in the xa
>> > transactions.  The JCA flow provides high performance concurrent
>> > delivery using.  The configuration is the same than for  the jms  
>> flow.
>> >
>> >>
>> >> My second question is probably more an ActiveMQ one, but I hope  
>> you
>> >> can comment anyway. We will be using a redundant database- 
>> server as
>> >> well. Should the ActiveMQ brokers be configured to use the same
>> >> database? Or should each have its own database?
>> >
>> > You should either use master / slave, or have a shared database  
>> if you
>> > want high availability, else messages kept by a broker are not
>> > available to other brokers, so if this one fails, the message  
>> will be
>> > lost.
>> >
>> > Cheers,
>> > Guillaume Nodet
>> >>
>> >> Thanks very much in advance for any help.
>> >>
>> >> B.J.
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>>
>>
>
>
> -- 
> Cheers,
> Guillaume Nodet


Re: Questions on JMSFlow/cluster configuration

Posted by Guillaume Nodet <gn...@gmail.com>.
On 5/16/06, William Blackburn <wj...@mac.com> wrote:
> Guillaume,
>
> Thank you for your quick reply. Sorry to be so dense, but I just want
> to confirm my understanding of what you've said:
>
> If I configure jms flow only with activemq journaled db persistence,
> I would get recovery of message-exchanges that were 'in-flight' at
> the time of a server crash, but I would NOT get exchanges that had
> already hit a particular component, correct?

Exactly.

>
> If I configure jca flow, I will, in addition to above, be able to get
> exchanges that were in the middle being processed by a component at
> the time of the crash, yes? Is this automatic, or must my components
> commit or rollback the transaction? Given that I am using extensions
> of servicemix' ComponentSupport, how would I get access to the
> transaction to do so?

The JCA flow uses jca ;)
So each time a jms message is received, a transaction is started and
the message consumption is part of the xa transaction.  The
transaction will be automatically commited, unless the setRollbackOnly
has been called on the transaction.
You can do that by using the
((TransactionManager) ComponentContext.getTransactionManager).getTransaction()
or
(Transaction) exchange.getProperty(MessageExchange.JTA_TRANSACTION_PROPERTY_NAME)

Remarks:
  * the jca flow does not handle sendSync because the message has to
be enlisted in a transaction so you may experience problems with
components using sendSync (note that you can also configure multiple
flows)
  * you can set the autoEnlistInTransaction attribute on the jbi
container to true so that all jbi exchanges will automatically be part
of a transaction
  * you should also set the persistent attribute on the jbi container
to true else jms messages will be sent using jms
DeliveryMode.NON_PERSISTENT

Cheers,
Guillaume Nodet

>
> Thanks again for all your help.
>
> BJ
>
> On May 16, 2006, at 11:47 AM, Guillaume Nodet wrote:
>
> > On 5/16/06, William Blackburn <wj...@mac.com> wrote:
> >> I will be moving from a single deployment, SEDA flow to a cluster
> >> using the JMSflow. I've run the cluster example and studied up on
> >> ActiveMQ, My goal is as much fault tolerance as load handling,
> >> Configuring ActiveMQ's journaled db persistence will get me most of
> >> the way (I think), but I still have two remaining questions.
> >>
> >> First, in the MQ sense, when is an message-exchange considered
> >> 'delivered' ? For example, if I have a bunch of servicemix components
> >> running on a node configured as above, and I yank the power while a
> >> component is in the middle of an 'onMessageExchange()' what happens
> >> to that message? Will ActiveMQ redeliver it when the node comes back
> >> up? Can components influence what ActiveMQ considers 'delivered' in
> >> any way.
> >
> > To be able to use redelivery, the flow should be able to use
> > acknowledgements, jms transactions or xa transactions.  Currenly there
> > is no callback to be able to use client acks or jms transaction, so
> > you will have to use xa transactions.   Note that there is no real
> > overhead if the jms resource is the only one enlisted in the xa
> > transactions.  The JCA flow provides high performance concurrent
> > delivery using.  The configuration is the same than for  the jms flow.
> >
> >>
> >> My second question is probably more an ActiveMQ one, but I hope you
> >> can comment anyway. We will be using a redundant database-server as
> >> well. Should the ActiveMQ brokers be configured to use the same
> >> database? Or should each have its own database?
> >
> > You should either use master / slave, or have a shared database if you
> > want high availability, else messages kept by a broker are not
> > available to other brokers, so if this one fails, the message will be
> > lost.
> >
> > Cheers,
> > Guillaume Nodet
> >>
> >> Thanks very much in advance for any help.
> >>
> >> B.J.
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
>
>


-- 
Cheers,
Guillaume Nodet

Re: Questions on JMSFlow/cluster configuration

Posted by William Blackburn <wj...@mac.com>.
Guillaume,

Thank you for your quick reply. Sorry to be so dense, but I just want  
to confirm my understanding of what you've said:

If I configure jms flow only with activemq journaled db persistence,  
I would get recovery of message-exchanges that were 'in-flight' at  
the time of a server crash, but I would NOT get exchanges that had  
already hit a particular component, correct?

If I configure jca flow, I will, in addition to above, be able to get  
exchanges that were in the middle being processed by a component at  
the time of the crash, yes? Is this automatic, or must my components  
commit or rollback the transaction? Given that I am using extensions  
of servicemix' ComponentSupport, how would I get access to the  
transaction to do so?

Thanks again for all your help.

BJ

On May 16, 2006, at 11:47 AM, Guillaume Nodet wrote:

> On 5/16/06, William Blackburn <wj...@mac.com> wrote:
>> I will be moving from a single deployment, SEDA flow to a cluster
>> using the JMSflow. I've run the cluster example and studied up on
>> ActiveMQ, My goal is as much fault tolerance as load handling,
>> Configuring ActiveMQ's journaled db persistence will get me most of
>> the way (I think), but I still have two remaining questions.
>>
>> First, in the MQ sense, when is an message-exchange considered
>> 'delivered' ? For example, if I have a bunch of servicemix components
>> running on a node configured as above, and I yank the power while a
>> component is in the middle of an 'onMessageExchange()' what happens
>> to that message? Will ActiveMQ redeliver it when the node comes back
>> up? Can components influence what ActiveMQ considers 'delivered' in
>> any way.
>
> To be able to use redelivery, the flow should be able to use
> acknowledgements, jms transactions or xa transactions.  Currenly there
> is no callback to be able to use client acks or jms transaction, so
> you will have to use xa transactions.   Note that there is no real
> overhead if the jms resource is the only one enlisted in the xa
> transactions.  The JCA flow provides high performance concurrent
> delivery using.  The configuration is the same than for  the jms flow.
>
>>
>> My second question is probably more an ActiveMQ one, but I hope you
>> can comment anyway. We will be using a redundant database-server as
>> well. Should the ActiveMQ brokers be configured to use the same
>> database? Or should each have its own database?
>
> You should either use master / slave, or have a shared database if you
> want high availability, else messages kept by a broker are not
> available to other brokers, so if this one fails, the message will be
> lost.
>
> Cheers,
> Guillaume Nodet
>>
>> Thanks very much in advance for any help.
>>
>> B.J.
>>
>
>
> -- 
> Cheers,
> Guillaume Nodet


Re: Questions on JMSFlow/cluster configuration

Posted by Guillaume Nodet <gn...@gmail.com>.
On 5/16/06, William Blackburn <wj...@mac.com> wrote:
> I will be moving from a single deployment, SEDA flow to a cluster
> using the JMSflow. I've run the cluster example and studied up on
> ActiveMQ, My goal is as much fault tolerance as load handling,
> Configuring ActiveMQ's journaled db persistence will get me most of
> the way (I think), but I still have two remaining questions.
>
> First, in the MQ sense, when is an message-exchange considered
> 'delivered' ? For example, if I have a bunch of servicemix components
> running on a node configured as above, and I yank the power while a
> component is in the middle of an 'onMessageExchange()' what happens
> to that message? Will ActiveMQ redeliver it when the node comes back
> up? Can components influence what ActiveMQ considers 'delivered' in
> any way.

To be able to use redelivery, the flow should be able to use
acknowledgements, jms transactions or xa transactions.  Currenly there
is no callback to be able to use client acks or jms transaction, so
you will have to use xa transactions.   Note that there is no real
overhead if the jms resource is the only one enlisted in the xa
transactions.  The JCA flow provides high performance concurrent
delivery using.  The configuration is the same than for  the jms flow.

>
> My second question is probably more an ActiveMQ one, but I hope you
> can comment anyway. We will be using a redundant database-server as
> well. Should the ActiveMQ brokers be configured to use the same
> database? Or should each have its own database?

You should either use master / slave, or have a shared database if you
want high availability, else messages kept by a broker are not
available to other brokers, so if this one fails, the message will be
lost.

Cheers,
Guillaume Nodet
>
> Thanks very much in advance for any help.
>
> B.J.
>


-- 
Cheers,
Guillaume Nodet