You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Laures <ba...@googlemail.com> on 2011/11/22 11:59:15 UTC

Creating a Connection to an activeMQ in Slave Mode

I'm using message consumer that run in the same jvm as ActiveMQ to monitor
the system.
Now one of these extended brokers has to run as a slave
(direct-replication).

How can i get Advisory Messages from the slave broker?
Creating a connection with vm://... as a broker url doesnt seem to work.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4095183.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Reply:Re: Creating a Connection to an activeMQ in Slave Mode

Posted by Laures <ba...@googlemail.com>.
i'm using pure master slave and the easiest way to be notified that the
master has failed is to listen to the slave for the inevitable: i am master
now advisory.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4186851.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Reply:Re: Creating a Connection to an activeMQ in Slave Mode

Posted by Torsten Mielke <to...@fusesource.com>.
There is generally not to monitor a lot about a slave as it won't startup anything (with the exception of pure-master-slave). But it should start its JMX server so that you can connect to the slave using any JMX client like jconsole. 


Regards,
Torsten




On Dec 12, 2011, at 4:01 PM, SuoNayi wrote:

> Yes,so how to monitor the slave is a trouble as well.
> I had raised a question about how to monitor master and slave as a whole but none answered me.
> 
> 
> 
> 
> At 2011-12-12 22:57:40,"Torsten Mielke" <to...@fusesource.com> wrote:
>> Does the web console work for your slave? I would have thought it does not (assuming embedded web console and not an external web console). 
>> The web console gets deployed at the end of the brokers startup, after it started the transport connector. 
>> If the slave waits on acquiring the lock that is held by the master, it should not start any transport connectors and it also should not deploy any web applications like the web console.
>> 
>> 
>> 
>> Torsten Mielke
>> torsten@fusesource.com
>> tmielke@blogspot.com
>> 
>> 
>> 
>> On Dec 12, 2011, at 2:17 PM, Laures wrote:
>> 
>>> short question because i just thought of it:
>>> 
>>> if a slave doesn't accept any connections while in slave mode:
>>> 
>>> how does the web console work for slaves?
>>> 
>>> --
>>> View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4185911.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> 




Reply:Re: Creating a Connection to an activeMQ in Slave Mode

Posted by SuoNayi <su...@163.com>.
Yes,so how to monitor the slave is a trouble as well.
I had raised a question about how to monitor master and slave as a whole but none answered me.




At 2011-12-12 22:57:40,"Torsten Mielke" <to...@fusesource.com> wrote:
>Does the web console work for your slave? I would have thought it does not (assuming embedded web console and not an external web console). 
>The web console gets deployed at the end of the brokers startup, after it started the transport connector. 
>If the slave waits on acquiring the lock that is held by the master, it should not start any transport connectors and it also should not deploy any web applications like the web console.
>
>
>
>Torsten Mielke
>torsten@fusesource.com
>tmielke@blogspot.com
>
>
>
>On Dec 12, 2011, at 2:17 PM, Laures wrote:
>
>> short question because i just thought of it:
>> 
>> if a slave doesn't accept any connections while in slave mode:
>> 
>> how does the web console work for slaves?
>> 
>> --
>> View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4185911.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
>

Re: Creating a Connection to an activeMQ in Slave Mode

Posted by Torsten Mielke <to...@fusesource.com>.
Does the web console work for your slave? I would have thought it does not (assuming embedded web console and not an external web console). 
The web console gets deployed at the end of the brokers startup, after it started the transport connector. 
If the slave waits on acquiring the lock that is held by the master, it should not start any transport connectors and it also should not deploy any web applications like the web console.



Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com



On Dec 12, 2011, at 2:17 PM, Laures wrote:

> short question because i just thought of it:
> 
> if a slave doesn't accept any connections while in slave mode:
> 
> how does the web console work for slaves?
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4185911.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.




Re: Creating a Connection to an activeMQ in Slave Mode

Posted by Laures <ba...@googlemail.com>.
to answer my own question: vm connections work. my earlier problem was caused
by a misconfiguration.
a configured master connection AND an active wait-for-slave option create
very interesting results. everything works now.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4186160.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Creating a Connection to an activeMQ in Slave Mode

Posted by Laures <ba...@googlemail.com>.
short question because i just thought of it:

if a slave doesn't accept any connections while in slave mode:

how does the web console work for slaves?

--
View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4185911.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Creating a Connection to an activeMQ in Slave Mode

Posted by Torsten Mielke <to...@fusesource.com>.
Hi,

Assuming you mean pure master slave setup (http://activemq.apache.org/pure-master-slave.html)
As long as your slave broker acts as a slave you can't get any advisory nor any other msgs from it. The slave won't start any transports, it will only connect  to the master broker.

Hope this helps.

Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com


On Nov 22, 2011, at 11:59 AM, Laures wrote:

> I'm using message consumer that run in the same jvm as ActiveMQ to monitor
> the system.
> Now one of these extended brokers has to run as a slave
> (direct-replication).
> 
> How can i get Advisory Messages from the slave broker?
> Creating a connection with vm://... as a broker url doesnt seem to work.
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Creating-a-Connection-to-an-activeMQ-in-Slave-Mode-tp4095183p4095183.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.