You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sandeep Chayapathi <sa...@wssource.com> on 2006/08/18 21:21:22 UTC

AMQ 4.0.1 - master/slave woes

Hi all,
  Im trying to setup AMQ 4.0.1 in master/slave mode. Im running both 
master & slave from the same box, but on different ports. Both have 
different data store (different data folders).
Im able to see in the log file, that the slave attaches itself to the 
master service.

  I have a test stomp client, which sends messages to: /queue/FOO.test 
queue. After storing some 20 messages, I stop the master server (ctrl+C  
the app).  Then start another stomp client, which tries to read 
/queue/FOO.test, from the slave server. I'm able to connect to the 
slave, but the slave does not have any message. I have followed the 
instructions given in: http://activemq.org/site/masterslave.html. Im not 
sure if the replication is only for durable queues. If so, how do I 
create durable queues via stomp ? Thanks.

- Sandeep

Re: AMQ 4.0.1 - master/slave woes

Posted by James Strachan <ja...@gmail.com>.
It could be a result of some of the Stomp fixes we've made recently.
Thanks for the heads up

On 8/21/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
> additional note: works under 4.0.2 also.
>
> - Sandeep
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: AMQ 4.0.1 - master/slave woes

Posted by Sandeep Chayapathi <sa...@wssource.com>.
additional note: works under 4.0.2 also.

- Sandeep

Re: AMQ 4.0.1 - master/slave woes

Posted by Sandeep Chayapathi <sa...@wssource.com>.
I tried this with the 4.1 snapshot release and it works. Looks to me 
that under 4.0.x, with master/slave setup, stomp doesn't work.

- Sandeep

Sandeep Chayapathi wrote:
> Thanks for the suggestion. The java client (ProducerTool.java and 
> ConsumerTool.java) were able to connect to my master/slave setup and 
> basically I was able to publish messages to the master,  and read it 
> from the slave, once the master was down.
>
> However the stomp protocol doesn't seem to play well in the 
> master/slave setup. I tried using the ruby client and it too hangs 
> while connecting to the master server. Basically this is what happens, 
> Im able to open the socket to the master server and send a CONNECT 
> frame to it. However the server never responds with CONNECTED frame. 
> If I shutdown the slave service, the stomp protocol works well.
>
> - Sandeep
>
> James Strachan wrote:
>> The master/slave does now work over the stomp protocol - so you need
>> to ensure that the masterConnectorURI is connecting over a regular
>> <transportConnector> such as the default on 61616 and you always
>> connect on something like 61613 via stomp.
>>
>> To avoid stomp confusion -  how about you try using the JMS client
>> first to test your configuration - then when you are sure you have got
>> that configured properly, trying stomp?
>>
>>
>> On 8/21/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
>>> Thanks. However even after setting "persistent:true" header for the
>>> stomp message, the slave did not replicate the message. As mentioned
>>> earlier, I have 2 instances of AMQ:
>>>   . one on port 61616 & stomp on 61613
>>>   . other on port 61615 and stomp on 61612
>>>
>>> if the slave's activemq.xml has this entry for the broker:
>>>
>>> ----
>>> <broker useJmx="true" name="TEST"
>>> masterConnectorURI="tcp://localhost:61616" 
>>> shutdownOnMasterFailure="false" >
>>> ...
>>> ----
>>>
>>> the test client never connects to the master server, that is Im able to
>>> send stomp connect message, but the server never responds with the
>>> CONNECTED header.
>>>
>>>  However, on the slave borker if I set the masterConnectorURI to 
>>> 61613 as:
>>> ----
>>> <broker useJmx="true" name="TEST"
>>> masterConnectorURI="tcp://localhost:61613" 
>>> shutdownOnMasterFailure="false" >
>>> ...
>>> ----
>>>
>>> the test  is able to connect and send message to the master server,
>>> however the slave server never replicates the message ( there is no
>>> other client subscribed to the queue)/
>>>
>>> - Sandeep
>>>
>>> James Strachan wrote:
>>> > I thought queues were persistent by default but you can specify the
>>> > explicit persistence mode via a header...
>>> >
>>> > http://incubator.apache.org/activemq/stomp.html
>>> >
>>> > i.e. adding persistent: true
>>> >
>>> >
>>> >
>>> > On 8/18/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
>>> >> Hi all,
>>> >>   Im trying to setup AMQ 4.0.1 in master/slave mode. Im running both
>>> >> master & slave from the same box, but on different ports. Both have
>>> >> different data store (different data folders).
>>> >> Im able to see in the log file, that the slave attaches itself to 
>>> the
>>> >> master service.
>>> >>
>>> >>   I have a test stomp client, which sends messages to: 
>>> /queue/FOO.test
>>> >> queue. After storing some 20 messages, I stop the master server 
>>> (ctrl+C
>>> >> the app).  Then start another stomp client, which tries to read
>>> >> /queue/FOO.test, from the slave server. I'm able to connect to the
>>> >> slave, but the slave does not have any message. I have followed the
>>> >> instructions given in: http://activemq.org/site/masterslave.html. 
>>> Im not
>>> >> sure if the replication is only for durable queues. If so, how do I
>>> >> create durable queues via stomp ? Thanks.
>>> >>
>>> >> - Sandeep
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>


Re: AMQ 4.0.1 - master/slave woes

Posted by Sandeep Chayapathi <sa...@wssource.com>.
Thanks for the suggestion. The java client (ProducerTool.java and 
ConsumerTool.java) were able to connect to my master/slave setup and 
basically I was able to publish messages to the master,  and read it 
from the slave, once the master was down.

However the stomp protocol doesn't seem to play well in the master/slave 
setup. I tried using the ruby client and it too hangs while connecting 
to the master server. Basically this is what happens, Im able to open 
the socket to the master server and send a CONNECT frame to it. However 
the server never responds with CONNECTED frame. If I shutdown the slave 
service, the stomp protocol works well.

- Sandeep

James Strachan wrote:
> The master/slave does now work over the stomp protocol - so you need
> to ensure that the masterConnectorURI is connecting over a regular
> <transportConnector> such as the default on 61616 and you always
> connect on something like 61613 via stomp.
>
> To avoid stomp confusion -  how about you try using the JMS client
> first to test your configuration - then when you are sure you have got
> that configured properly, trying stomp?
>
>
> On 8/21/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
>> Thanks. However even after setting "persistent:true" header for the
>> stomp message, the slave did not replicate the message. As mentioned
>> earlier, I have 2 instances of AMQ:
>>   . one on port 61616 & stomp on 61613
>>   . other on port 61615 and stomp on 61612
>>
>> if the slave's activemq.xml has this entry for the broker:
>>
>> ----
>> <broker useJmx="true" name="TEST"
>> masterConnectorURI="tcp://localhost:61616" 
>> shutdownOnMasterFailure="false" >
>> ...
>> ----
>>
>> the test client never connects to the master server, that is Im able to
>> send stomp connect message, but the server never responds with the
>> CONNECTED header.
>>
>>  However, on the slave borker if I set the masterConnectorURI to 
>> 61613 as:
>> ----
>> <broker useJmx="true" name="TEST"
>> masterConnectorURI="tcp://localhost:61613" 
>> shutdownOnMasterFailure="false" >
>> ...
>> ----
>>
>> the test  is able to connect and send message to the master server,
>> however the slave server never replicates the message ( there is no
>> other client subscribed to the queue)/
>>
>> - Sandeep
>>
>> James Strachan wrote:
>> > I thought queues were persistent by default but you can specify the
>> > explicit persistence mode via a header...
>> >
>> > http://incubator.apache.org/activemq/stomp.html
>> >
>> > i.e. adding persistent: true
>> >
>> >
>> >
>> > On 8/18/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
>> >> Hi all,
>> >>   Im trying to setup AMQ 4.0.1 in master/slave mode. Im running both
>> >> master & slave from the same box, but on different ports. Both have
>> >> different data store (different data folders).
>> >> Im able to see in the log file, that the slave attaches itself to the
>> >> master service.
>> >>
>> >>   I have a test stomp client, which sends messages to: 
>> /queue/FOO.test
>> >> queue. After storing some 20 messages, I stop the master server 
>> (ctrl+C
>> >> the app).  Then start another stomp client, which tries to read
>> >> /queue/FOO.test, from the slave server. I'm able to connect to the
>> >> slave, but the slave does not have any message. I have followed the
>> >> instructions given in: http://activemq.org/site/masterslave.html. 
>> Im not
>> >> sure if the replication is only for durable queues. If so, how do I
>> >> create durable queues via stomp ? Thanks.
>> >>
>> >> - Sandeep
>> >>
>> >
>> >
>>
>>
>
>


Re: AMQ 4.0.1 - master/slave woes

Posted by James Strachan <ja...@gmail.com>.
The master/slave does now work over the stomp protocol - so you need
to ensure that the masterConnectorURI is connecting over a regular
<transportConnector> such as the default on 61616 and you always
connect on something like 61613 via stomp.

To avoid stomp confusion -  how about you try using the JMS client
first to test your configuration - then when you are sure you have got
that configured properly, trying stomp?


On 8/21/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
> Thanks. However even after setting "persistent:true" header for the
> stomp message, the slave did not replicate the message. As mentioned
> earlier, I have 2 instances of AMQ:
>   . one on port 61616 & stomp on 61613
>   . other on port 61615 and stomp on 61612
>
> if the slave's activemq.xml has this entry for the broker:
>
> ----
> <broker useJmx="true" name="TEST"
> masterConnectorURI="tcp://localhost:61616" shutdownOnMasterFailure="false" >
> ...
> ----
>
> the test client never connects to the master server, that is Im able to
> send stomp connect message, but the server never responds with the
> CONNECTED header.
>
>  However, on the slave borker if I set the masterConnectorURI to 61613 as:
> ----
> <broker useJmx="true" name="TEST"
> masterConnectorURI="tcp://localhost:61613" shutdownOnMasterFailure="false" >
> ...
> ----
>
> the test  is able to connect and send message to the master server,
> however the slave server never replicates the message ( there is no
> other client subscribed to the queue)/
>
> - Sandeep
>
> James Strachan wrote:
> > I thought queues were persistent by default but you can specify the
> > explicit persistence mode via a header...
> >
> > http://incubator.apache.org/activemq/stomp.html
> >
> > i.e. adding persistent: true
> >
> >
> >
> > On 8/18/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
> >> Hi all,
> >>   Im trying to setup AMQ 4.0.1 in master/slave mode. Im running both
> >> master & slave from the same box, but on different ports. Both have
> >> different data store (different data folders).
> >> Im able to see in the log file, that the slave attaches itself to the
> >> master service.
> >>
> >>   I have a test stomp client, which sends messages to: /queue/FOO.test
> >> queue. After storing some 20 messages, I stop the master server (ctrl+C
> >> the app).  Then start another stomp client, which tries to read
> >> /queue/FOO.test, from the slave server. I'm able to connect to the
> >> slave, but the slave does not have any message. I have followed the
> >> instructions given in: http://activemq.org/site/masterslave.html. Im not
> >> sure if the replication is only for durable queues. If so, how do I
> >> create durable queues via stomp ? Thanks.
> >>
> >> - Sandeep
> >>
> >
> >
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Re: AMQ 4.0.1 - master/slave woes

Posted by Sandeep Chayapathi <sa...@wssource.com>.
Thanks. However even after setting "persistent:true" header for the 
stomp message, the slave did not replicate the message. As mentioned 
earlier, I have 2 instances of AMQ:
  . one on port 61616 & stomp on 61613
  . other on port 61615 and stomp on 61612

if the slave's activemq.xml has this entry for the broker:

----
<broker useJmx="true" name="TEST" 
masterConnectorURI="tcp://localhost:61616" shutdownOnMasterFailure="false" >
...
----

the test client never connects to the master server, that is Im able to 
send stomp connect message, but the server never responds with the 
CONNECTED header.

 However, on the slave borker if I set the masterConnectorURI to 61613 as:
----
<broker useJmx="true" name="TEST" 
masterConnectorURI="tcp://localhost:61613" shutdownOnMasterFailure="false" >
...
----

the test  is able to connect and send message to the master server, 
however the slave server never replicates the message ( there is no 
other client subscribed to the queue)/

- Sandeep

James Strachan wrote:
> I thought queues were persistent by default but you can specify the
> explicit persistence mode via a header...
>
> http://incubator.apache.org/activemq/stomp.html
>
> i.e. adding persistent: true
>
>
>
> On 8/18/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
>> Hi all,
>>   Im trying to setup AMQ 4.0.1 in master/slave mode. Im running both
>> master & slave from the same box, but on different ports. Both have
>> different data store (different data folders).
>> Im able to see in the log file, that the slave attaches itself to the
>> master service.
>>
>>   I have a test stomp client, which sends messages to: /queue/FOO.test
>> queue. After storing some 20 messages, I stop the master server (ctrl+C
>> the app).  Then start another stomp client, which tries to read
>> /queue/FOO.test, from the slave server. I'm able to connect to the
>> slave, but the slave does not have any message. I have followed the
>> instructions given in: http://activemq.org/site/masterslave.html. Im not
>> sure if the replication is only for durable queues. If so, how do I
>> create durable queues via stomp ? Thanks.
>>
>> - Sandeep
>>
>
>


Re: AMQ 4.0.1 - master/slave woes

Posted by James Strachan <ja...@gmail.com>.
I thought queues were persistent by default but you can specify the
explicit persistence mode via a header...

http://incubator.apache.org/activemq/stomp.html

i.e. adding persistent: true



On 8/18/06, Sandeep Chayapathi <sa...@wssource.com> wrote:
> Hi all,
>   Im trying to setup AMQ 4.0.1 in master/slave mode. Im running both
> master & slave from the same box, but on different ports. Both have
> different data store (different data folders).
> Im able to see in the log file, that the slave attaches itself to the
> master service.
>
>   I have a test stomp client, which sends messages to: /queue/FOO.test
> queue. After storing some 20 messages, I stop the master server (ctrl+C
> the app).  Then start another stomp client, which tries to read
> /queue/FOO.test, from the slave server. I'm able to connect to the
> slave, but the slave does not have any message. I have followed the
> instructions given in: http://activemq.org/site/masterslave.html. Im not
> sure if the replication is only for durable queues. If so, how do I
> create durable queues via stomp ? Thanks.
>
> - Sandeep
>


-- 

James
-------
http://radio.weblogs.com/0112098/