activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Consumer and Failover
Date Wed, 17 Feb 2010 12:26:56 GMT
sure. but if you can produce a simple pure java test case it would be great.

On 17 February 2010 08:54, Jean-Yves LEBLEU <jlebleu@gmail.com> wrote:

> Hi all,
>
> Should I open an issue in Jira ?
> Rgds.
> JY
>
> On Tue, Feb 16, 2010 at 5:25 PM, Jean-Yves LEBLEU <jlebleu@gmail.com>
> wrote:
> > We are using 5.3.0, but have the same problem in 5.2.0
> >
> >
> > On Tue, Feb 16, 2010 at 5:20 PM, James Strachan
> > <james.strachan@gmail.com> wrote:
> >> Which version are you using BTW?
> >>
> >> On 16 February 2010 16:17, Jean-Yves LEBLEU <jlebleu@gmail.com> wrote:
> >>> On Tue, Feb 16, 2010 at 4:54 PM, James Strachan
> >>> <james.strachan@gmail.com> wrote:
> >>>> On 16 February 2010 15:38, Jean-Yves LEBLEU <jlebleu@gmail.com>
> 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...
> >>>>
> >>>> http://activemq.apache.org/failover-transport-reference.html
> >>>>
> >>>> e.g. try this URL
> >>>>
> >>>> failover:(tcp://localhost:61618)?maxReconnectAttempts=1000
> >>>>
> >>>>
> >>>> BTW slightly more idiomatic Scala code for onMessage would be...
> >>>>
> >>>> def onMessage(message: Message): Unit = message match {
> >>>>  case textMessage: TextMessage =>  println("Message recieved: " +
> >>>> textMessage.getText())
> >>>>  case _ => println("Oops, not a text message")
> >>>> }
> >>>> --
> >>>> James
> >>>> -------
> >>>> http://macstrac.blogspot.com/
> >>>>
> >>>> Open Source Integration
> >>>> http://fusesource.com/
> >>>>
> >>>
> >>> James,
> >>>
> >>> Thanks for the more idiomatic Scala code, we are starting to use scala
> >>> instead of java and have not explored all the scala subtelties :).
> >>>
> >>> I tried with maxReconnectAttempts=1000, the consumer stops after 7
> >>> attempts to reconnect to the broker.
> >>>
> >>> Regards.
> >>> Jean-Yves
> >>>
> >>
> >>
> >>
> >> --
> >> James
> >> -------
> >> http://macstrac.blogspot.com/
> >>
> >> Open Source Integration
> >> http://fusesource.com/
> >>
> >
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message