You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by yrkhanal <yr...@hotmail.com> on 2008/01/29 19:51:15 UTC

How to enable jms flow in two containers

Hi,
I have two servicemix containers running on the same machine.
Also I one ActiveMQ broker and both servicemix containers listens to the
same port in the activemq.I have a client that sends messages and gets back
the exchanges.
But while deploying the same service assembly in two machines I have some
jms flow exception.
I am not sure why I am getting this.
I thought jms flow is default and is required for amq clustering.
I even added one line in servicemix.xml where it says 
flowNames="jms".
I am not sure what else I need to do to resolve this issue?
Anymore configuration ?
Regards,
Yogaraj
-- 
View this message in context: http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15166422.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to enable jms flow in two containers

Posted by Chris Custine <cc...@apache.org>.
The stack trace in your other message was from servicemix startup, I thought
you were saying in this current thread that you were getting an error while
deploying a service assembly so that was why I asked for more information.

Thanks,
Chris

On Jan 29, 2008 7:33 PM, yrkhanal <yr...@hotmail.com> wrote:

>
> Hi Chris,
> I have another post today with the stack trace.
> Yogaraj
>
> Chris Custine (Apache) wrote:
> >
> > On Jan 29, 2008 11:51 AM, yrkhanal <yr...@hotmail.com> wrote:
> >
> >>
> >> Hi,
> >> I have two servicemix containers running on the same machine.
> >> Also I one ActiveMQ broker and both servicemix containers listens to
> the
> >> same port in the activemq.I have a client that sends messages and gets
> >> back
> >> the exchanges.
> >> But while deploying the same service assembly in two machines I have
> some
> >> jms flow exception.
> >
> >
> > Could you post the output with these exceptions and also the
> > servicemix.xmlfrom both of the machines you are trying to connect via
> > jmsFlow?
> >
> >
> >
> >> I am not sure why I am getting this.
> >> I thought jms flow is default and is required for amq clustering.
> >> I even added one line in servicemix.xml where it says
> >> flowNames="jms".
> >> I am not sure what else I need to do to resolve this issue?
> >> Anymore configuration ?
> >> Regards,
> >> Yogaraj
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15166422.html
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> > Thanks,
> > Chris
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15174364.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>

Re: How to enable jms flow in two containers

Posted by yrkhanal <yr...@hotmail.com>.
Hi Chris,
I have another post today with the stack trace.
Yogaraj

Chris Custine (Apache) wrote:
> 
> On Jan 29, 2008 11:51 AM, yrkhanal <yr...@hotmail.com> wrote:
> 
>>
>> Hi,
>> I have two servicemix containers running on the same machine.
>> Also I one ActiveMQ broker and both servicemix containers listens to the
>> same port in the activemq.I have a client that sends messages and gets
>> back
>> the exchanges.
>> But while deploying the same service assembly in two machines I have some
>> jms flow exception.
> 
> 
> Could you post the output with these exceptions and also the
> servicemix.xmlfrom both of the machines you are trying to connect via
> jmsFlow?
> 
> 
> 
>> I am not sure why I am getting this.
>> I thought jms flow is default and is required for amq clustering.
>> I even added one line in servicemix.xml where it says
>> flowNames="jms".
>> I am not sure what else I need to do to resolve this issue?
>> Anymore configuration ?
>> Regards,
>> Yogaraj
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15166422.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> Thanks,
> Chris
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15174364.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to enable jms flow in two containers

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 31, 2008 10:20 AM, yrkhanal <yr...@hotmail.com> wrote:
>
> Bruce,
> Is there a way I can do ActiveMQ clustering as well.
> In the present scenario if My ActiveMQ shuts down then the servicemix have
> to restart to connect to it.So is there software level of clustering for
> both ActiveMQ and Servicemix.
> Is it possible to use embedded ActiveMQ cluster in this situation.
> If yes what are the configuration I need to make.
> Please describe in brief.

ActiveMQ can handle failover of the broker using the Master/Slave
configuration. See the following document for more info:

http://activemq.apache.org/masterslave.html

But if you want reconnect, you need to change from using the
jms:endpoint to using the jms:consumer in the xbean.xml configuration
file.

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 Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: How to enable jms flow in two containers

Posted by yrkhanal <yr...@hotmail.com>.
Bruce,
Is there a way I can do ActiveMQ clustering as well.
In the present scenario if My ActiveMQ shuts down then the servicemix have
to restart to connect to it.So is there software level of clustering for
both ActiveMQ and Servicemix.
Is it possible to use embedded ActiveMQ cluster in this situation.
If yes what are the configuration I need to make.
Please describe in brief.
Regards,
Yogaraj

bsnyder wrote:
> 
> On Jan 30, 2008 12:58 PM, yrkhanal <yr...@hotmail.com> wrote:
>>
>> Thanks Bruce it was informative for me.
>> I think I need to enable all the flow then.
>> Can you please tell me like how does the no of container has effect on
>> performance and where can I find information about them.
> 
> The number of containers should only have an effect on performance if
> there is some latency between them or if there is an extremely large
> amount of them. Unfortunately there is no information about this topic
> in the wiki.
> 
>> Also if I restart ActiveMQ servicemix containers doesn't seem to connect
>> to
>> that again unless I start servicemix as well.Can you please post your
>> opinion on this as well.
> 
> This is directly related to the endpoints that are being used as a
> result of your configuration for the servicemix-jms component in the
> xbean.xml file. If you're using the jms:endoint, this refers to the
> endpoints referenced here:
> 
> http://servicemix.apache.org/servicemix-jms.html
> 
> The jms:endpoint does not support automatic reconnection and is the
> problem that you're seeing. To work around this, you will need to
> instead use the newer jms:consumer endpoint that is referenced here:
> 
> http://servicemix.apache.org/servicemix-jms-new-endpoints.html
> 
> The jms:consumer endpoint supports reconnection as well as various
> levels of caching the connection, session and consumer. Depending on
> the JMS provider you are using, your mileage may vary (YMMV).
> 
> 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 Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15208608.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to enable jms flow in two containers

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 30, 2008 12:58 PM, yrkhanal <yr...@hotmail.com> wrote:
>
> Thanks Bruce it was informative for me.
> I think I need to enable all the flow then.
> Can you please tell me like how does the no of container has effect on
> performance and where can I find information about them.

The number of containers should only have an effect on performance if
there is some latency between them or if there is an extremely large
amount of them. Unfortunately there is no information about this topic
in the wiki.

> Also if I restart ActiveMQ servicemix containers doesn't seem to connect to
> that again unless I start servicemix as well.Can you please post your
> opinion on this as well.

This is directly related to the endpoints that are being used as a
result of your configuration for the servicemix-jms component in the
xbean.xml file. If you're using the jms:endoint, this refers to the
endpoints referenced here:

http://servicemix.apache.org/servicemix-jms.html

The jms:endpoint does not support automatic reconnection and is the
problem that you're seeing. To work around this, you will need to
instead use the newer jms:consumer endpoint that is referenced here:

http://servicemix.apache.org/servicemix-jms-new-endpoints.html

The jms:consumer endpoint supports reconnection as well as various
levels of caching the connection, session and consumer. Depending on
the JMS provider you are using, your mileage may vary (YMMV).

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 Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: How to enable jms flow in two containers

Posted by yrkhanal <yr...@hotmail.com>.
Thanks Bruce it was informative for me.
I think I need to enable all the flow then.
Can you please tell me like how does the no of container has effect on
performance and where can I find information about them.
Also if I restart ActiveMQ servicemix containers doesn't seem to connect to
that again unless I start servicemix as well.Can you please post your
opinion on this as well.
Regards,
Yogaraj

bsnyder wrote:
> 
> On Jan 30, 2008 6:59 AM, yrkhanal <yr...@hotmail.com> wrote:
>>
>> I think its working now.
>> but in debug mode I can see both JMS and JCA flow are enabled.
>> Will it work fine if I disable JCA flow.
> 
> The flows do not depend on one another so you can disable the JCA flow
> if you don't need it (the JCA flow is the only way to enable
> transactionality). It's just that the default ServiceMix configuation
> enables SEDA, JMS and JCA.
> 
> 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 Camel - http://activemq.org/camel/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15190659.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to enable jms flow in two containers

Posted by Bruce Snyder <br...@gmail.com>.
On Jan 30, 2008 6:59 AM, yrkhanal <yr...@hotmail.com> wrote:
>
> I think its working now.
> but in debug mode I can see both JMS and JCA flow are enabled.
> Will it work fine if I disable JCA flow.

The flows do not depend on one another so you can disable the JCA flow
if you don't need it (the JCA flow is the only way to enable
transactionality). It's just that the default ServiceMix configuation
enables SEDA, JMS and JCA.

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 Camel - http://activemq.org/camel/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/

Blog: http://bruceblog.org/

Re: How to enable jms flow in two containers

Posted by yrkhanal <yr...@hotmail.com>.
I think its working now.
but in debug mode I can see both JMS and JCA flow are enabled.
Will it work fine if I disable JCA flow.
Regards,
Yogaraj

Chris Custine (Apache) wrote:
> 
> On Jan 29, 2008 11:51 AM, yrkhanal <yr...@hotmail.com> wrote:
> 
>>
>> Hi,
>> I have two servicemix containers running on the same machine.
>> Also I one ActiveMQ broker and both servicemix containers listens to the
>> same port in the activemq.I have a client that sends messages and gets
>> back
>> the exchanges.
>> But while deploying the same service assembly in two machines I have some
>> jms flow exception.
> 
> 
> Could you post the output with these exceptions and also the
> servicemix.xmlfrom both of the machines you are trying to connect via
> jmsFlow?
> 
> 
> 
>> I am not sure why I am getting this.
>> I thought jms flow is default and is required for amq clustering.
>> I even added one line in servicemix.xml where it says
>> flowNames="jms".
>> I am not sure what else I need to do to resolve this issue?
>> Anymore configuration ?
>> Regards,
>> Yogaraj
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15166422.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> Thanks,
> Chris
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15182801.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: How to enable jms flow in two containers

Posted by Chris Custine <cc...@apache.org>.
On Jan 29, 2008 11:51 AM, yrkhanal <yr...@hotmail.com> wrote:

>
> Hi,
> I have two servicemix containers running on the same machine.
> Also I one ActiveMQ broker and both servicemix containers listens to the
> same port in the activemq.I have a client that sends messages and gets
> back
> the exchanges.
> But while deploying the same service assembly in two machines I have some
> jms flow exception.


Could you post the output with these exceptions and also the
servicemix.xmlfrom both of the machines you are trying to connect via
jmsFlow?



> I am not sure why I am getting this.
> I thought jms flow is default and is required for amq clustering.
> I even added one line in servicemix.xml where it says
> flowNames="jms".
> I am not sure what else I need to do to resolve this issue?
> Anymore configuration ?
> Regards,
> Yogaraj
> --
> View this message in context:
> http://www.nabble.com/How-to-enable-jms-flow-in-two-containers-tp15166422s12049p15166422.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
Thanks,
Chris