You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Zagan <er...@gmail.com> on 2012/02/15 14:41:34 UTC

JMS specific failover capabilities

Hello,

I have the problem that one of my message producers/consumers is SAP PI.
It can be configured to access Active MQ through the use of a Generic JMS
driver.

The communication between SAP PI and Active MQ instance should be highly
available.
Therefore I have to use failover protocol on the client side and Shared
Filesystem Master/Slave
on the active mq instance level. Because the failover protocol is Active MQ
specific and not required
in the JMS spec I can't use it. 

Does the JMS Specification provide any failover capabilities which I could
use? If not, are there any workarounds like a Proxy for Active MQ instances?

So far I found this, which is from my point of view not satisfying :-)
http://forums.sdn.sap.com/thread.jspa?threadID=1833945
http://forums.sdn.sap.com/thread.jspa?threadID=1833945 

Thanks in advance!

--
View this message in context: http://activemq.2283324.n4.nabble.com/JMS-specific-failover-capabilities-tp4390459p4390459.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: JMS specific failover capabilities

Posted by Zagan <er...@gmail.com>.
Hi Matt,
sadly I couldn't check if the SAP PI adapter can understand a failover URL.
I will have an answear next tuesday, when I get access to the system.

I am a little bit confused today and sadly didn't understand your whole
answear.
What does your current SAP PI URL look like?
So far as I understand, you can only provide the URL to the master. But when
the master crashes, what is done? Can you provide a step-by-step description
how the failover works, especially which role the second master plays? 
Why do you need the updateClusterClients option, since it seems only to be
important when using the failover protocol?


--
View this message in context: http://activemq.2283324.n4.nabble.com/JMS-specific-failover-capabilities-tp4390459p4409735.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: JMS specific failover capabilities

Posted by Matt Pavlovich <ma...@gmail.com>.
Zagan-

Are you seeing the same problem I saw with the SAP adapter, where it 
wouldn't allow you to set a failover URL in the SAP PI JMS configuration 
screen?  ie.. you can only point it to the master, and not the master+slave?

The updateClusterClients option in ActiveMQ, allows you to set one host 
in the client side URL-- "tcp://master1:61616", and the broker will tell 
the client about other brokers in the broker network.  This allows for 
dynamically adding brokers to the network, w/o having to update client 
URLs all the time.

The SAP problem that I saw, was that you couldn't specify the failover 
URI for a master and slave-- ERROR: 
"failover:(tcp://master1:61616,tcp://slave1:61616)", and we were stuck 
only using one broker in the URI-- WORKS: tcp://master1:61616.

In order to provide failover and HA for the SAP PI connection, we used 
the updateClusterClient feature and we were able to get HA w/o having to 
wait for the SAP bug to be fixed.

The catch with updateClusterClients, is that it doesn't know about 
slaves until they become active, so that's why you would need to masters 
and two slaves to work around the SAP issue.

Hope this clears it up!
Matt Pavlovich

On 2/16/12 3:10 AM, Zagan wrote:
> Hi Matt,
> thank you very much! Sadly I don't understand why I need two masters and two
> slaves.
> When I get it right in general the client connects to master1.
> When master1 goes down, it reconnects to master2.
> How is this achieved?
> Is master1 acting like a proxy because of the network connector? But if it
> is down it couldn't act, or did I miss here anything?
> Well if this works, it would be better if the network connector points to
> the slave which comes
> up!
>
>
> http://activemq.2283324.n4.nabble.com/file/n4393359/ActiveMQHA.jpg
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/JMS-specific-failover-capabilities-tp4390459p4393359.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: JMS specific failover capabilities

Posted by Zagan <er...@gmail.com>.
Hi Matt,
thank you very much! Sadly I don't understand why I need two masters and two
slaves.
When I get it right in general the client connects to master1.
When master1 goes down, it reconnects to master2. 
How is this achieved? 
Is master1 acting like a proxy because of the network connector? But if it
is down it couldn't act, or did I miss here anything?
Well if this works, it would be better if the network connector points to
the slave which comes
up!


http://activemq.2283324.n4.nabble.com/file/n4393359/ActiveMQHA.jpg 



--
View this message in context: http://activemq.2283324.n4.nabble.com/JMS-specific-failover-capabilities-tp4390459p4393359.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: JMS specific failover capabilities

Posted by Matt Pavlovich <ma...@gmail.com>.
Hi-

I've seen that config setup in SAP at another customer, and the bug is 
in SAP's JMS configuration.  There is supposedly a bug ticket open with 
SAP on it, I suggest adding a "+1" to the ticket ;-).  There are a 
number of blog posts that claim to get escape characters in order for it 
to take it, but we weren't able to get any of those working correctly.

I think your best bet is to use updateClusterClients="true".  You'll 
need two pairs of Master/Slave brokers connected with a network 
connector.  In this scenario, your SAP clients will have a URL pointing 
to one of the Master brokers.

Step-by-step behavior
1. Client connects to Master 1  ie.. "tcp://master1:61616"
2. Master 1 gives client a list of "Active" brokers in the broker 
network -- failover://tcp://master1:61616, tcp://master2:61617.
     (This all happens in the ActiveMQ client code, so the SAP PI config 
does not come into play.)
3. Master 1 fails, client connects to Master 2
3. Slave 1 comes up.  Master 2 provides client a list of active 
brokers-- master2, slave1.
4. etc..

Broker side config here:
http://activemq.apache.org/failover-transport-reference.html

Hope this helps!
Matt Pavlovich

On 2/15/12 7:41 AM, Zagan wrote:
> Hello,
>
> I have the problem that one of my message producers/consumers is SAP PI.
> It can be configured to access Active MQ through the use of a Generic JMS
> driver.
>
> The communication between SAP PI and Active MQ instance should be highly
> available.
> Therefore I have to use failover protocol on the client side and Shared
> Filesystem Master/Slave
> on the active mq instance level. Because the failover protocol is Active MQ
> specific and not required
> in the JMS spec I can't use it.
>
> Does the JMS Specification provide any failover capabilities which I could
> use? If not, are there any workarounds like a Proxy for Active MQ instances?
>
> So far I found this, which is from my point of view not satisfying :-)
> http://forums.sdn.sap.com/thread.jspa?threadID=1833945
> http://forums.sdn.sap.com/thread.jspa?threadID=1833945
>
> Thanks in advance!
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/JMS-specific-failover-capabilities-tp4390459p4390459.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.