{"id":1146,"date":"2009-11-10T00:02:45","date_gmt":"2009-11-09T23:02:45","guid":{"rendered":"http:\/\/www.devco.net\/?p=1146"},"modified":"2010-08-17T12:31:42","modified_gmt":"2010-08-17T11:31:42","slug":"activemq_clustering","status":"publish","type":"post","link":"https:\/\/www.devco.net\/archives\/2009\/11\/10\/activemq_clustering.php","title":{"rendered":"ActiveMQ Clustering"},"content":{"rendered":"
As part of deploying MCollective<\/a> + ActiveMQ<\/a> instead of my old Spread based system I need to figure out a multi location setup, the documentation says I’d possible so I thought I better get down and figure it out.<\/p>\n In my case I will have per-country ActiveMQ’s, I’ve had the same with Spread in the past and it’s proven reliable enough for my needs, each ActiveMQ will carry 30 or so nodes.<\/p>\n ActiveMQ Cluster<\/p><\/div>\n The above image shows a possible setup, you can go much more complex, you can do typical hub-and-spoke setups, a fully meshed setup or maybe have a local one in your NOC etc, ActiveMQ is clever enough not to create message loops or storms if you create loops so you can build lots of resilient routes. <\/p>\n ActiveMQ calls this a Network of Brokers and the minimal docs can be found here<\/a>. They also have docs on using SSL<\/a> for connections, you can encrypt the inter DC traffic using that.<\/p>\n I’ll show sample config below of the one ActiveMQ node, the other would be identical except for the IP of it’s partner.\u00a0 The sample uses authentication between links as I think you really should be using auth everywhere.<\/p>\n <\/code><\/p>\n These are basically your listeners, we want to accept Stomp and OpenWire connections.<\/p>\n Now comes the connection to the other ActiveMQ server:<\/p>\n <\/code><\/p>\n This sets up a connection to the remote server at 192.168.1.10<\/em> using username amq<\/em> and password Afuphohxoh<\/em>. You can also designate failover and backup links, see the docs for samples<\/a>. If you’re building lots of servers talking to each other you should give every link on every server a unique name. Here I called it amq1_amq2<\/em> for comms from a server called amq1<\/em> to amq2<\/em>, this is a simple naming scheme that ensures things are unique.<\/p>\n Next up comes the Authentication and Authorization bits, this sets up the amq<\/em> user and an mcollective<\/em> user that can use the topic \/topic\/mcollective.*<\/em>. More about ActiveMQ’s security model can be found here<\/a>.<\/p>\n<\/p>\n
\r\n
<\/p>\n
\r\n
<\/p>\n
\r\n