Using a web service to drop message onto an ActiveMQ Queue fails on failover

StackOverflow https://stackoverflow.com/questions/15954099

  •  03-04-2022
  •  | 
  •  

Вопрос

I have a two activeMQ(5.6.0) brokers. They use a shared kaha database so only one can be 'running' at once.

I have a (asp.net) webservice that puts a message on a queue, locally if I start and stop the brokers the webservice fails over correctly

when I test with the brokers on seperate machines it sometimes works but often I get "socketException: Connection reset" errors and the message is lost.

The connection string I am using is below. Note that I am aware NMS does not understand the priority backup command but I have left it there for the future.

failover:(tcp://MACHINE1:61616,tcp://MACHINE2:62616)?transport.initialReconnectDelay=1000&transport.timeout=10000&randomize=false&priorityBackup=true

How can I make my fail over between brokers fool proof?

Это было полезно?

Решение

The shared Kaha database was on a simple share. Currently activeMQ (or windows) cannot reliably get or release the lock in this configuration. The shared database must sit on a 'real' SAN so that both instances of the queue software see the database as being on a local filestore not a network location.

See this page for more info http://activemq.apache.org/shared-file-system-master-slave.html

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top