activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Strachan <>
Subject Re: Consumer and Failover
Date Tue, 16 Feb 2010 15:54:19 GMT
On 16 February 2010 15:38, Jean-Yves LEBLEU <> wrote:
> Hi all,
> I am trying to use the failover transport
> (failover:(tcp://localhost:61618)), and I have some questions :
> I did a test with a simple consumer in scala (see the code and log at
> the end of the mail).
> Scenario :
> Broker is stopped.
> We start the consumer, it waits
> Start the broker
> Consumer connects and consume messages
> Stop the broker and start the broker again
> Consumer tries 6 times to reconnect and stop working.

I wonder if you have not restarted the broker in time for the client
to reconnect? How long does the client take to reconnect and how long
is the broker down for?

Maybe you could try increasing the amount of time the failover
transport waits before failing to connect...

e.g. try this URL


BTW slightly more idiomatic Scala code for onMessage would be...

def onMessage(message: Message): Unit = message match {
  case textMessage: TextMessage =>  println("Message recieved: " +
  case _ => println("Oops, not a text message")

Open Source Integration

View raw message