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: Failover in 5.2.0
Date Fri, 13 Mar 2009 17:07:28 GMT
If you are in the same VM, then use the
vm:<http://activemq.apache.org/how-should-i-use-the-vm-transport.html>scheme
as this will be a lot faster as there is no marshaling overhead.

I guess it is worth investigating what is causing your connections to get
dropped. Is it inactivity timeout or network issues?

With failover, network or connection drop issues will be hidden from your
application as the transport will block while it reconnects.
There may be situations where you want such issues to filter up to your
application to deal with them there, in which case failover: should be
avoided or configured to fail after a low number of retries.

but it is no harm to use it with a single broker, just be aware that by
default it will block with some incremental backoff. check out the reference
page for details.

2009/3/13 Ryan Moquin <fragility2.0@gmail.com>

> Ahhhhhh ok.. that explains a lot... Too bad I didn't ask this question a
> lot
> sooner since I've been very confused over the last week on why updates
> seemed to stop unexpectedly when they never used to.  On the same note,
> should I use failover even for interVM connections?  Such as my servicemix
> services?  Are there any times it's safe not to use the failover transport?
> Or should it always be used unless you have a specific reason you wouldn't
> want it to connect?
>
> Thanks!
>
> On Fri, Mar 13, 2009 at 12:16 PM, Gary Tully <gary.tully@gmail.com> wrote:
>
> > you still need to use the failover: scheme in 5.2 when you provide a url
> > and
> > want failover.
> > The change only effects users who do not provide a brokerUrl to the
> > ActiveMQConnectionFactory.
> > That is the only case where the defaultUrl is used.
> >
> > 2009/3/13 Ryan Moquin <fragility2.0@gmail.com>
> >
> > > I've been using ActivbeMQ 5.2 for a while now and am having a problem
> > where
> > > my topic subscribers seem to lose their connections to the ActiveMQ
> > broker
> > > after around 1,000 messages (it seems like they consistently lose their
> > > connection at just over 1,000 messages).  My publishers (SOA services
> in
> > > Servicemix) and my consumers (in a separate VM) are on the same
> machine.
> >  I
> > > can tell my consumers are losing their connections by looking at the
> > > activemq web console, I can see the connections will just go away while
> > my
> > > publishers keep sending.  I don't see any error anywhere on my consumer
> > > side
> > > indicating why the connections were dropped.  Now, assuming some weird
> > > network issue (even though they are on the same machine, it seems that
> > > network issues will affect local connections) is causing my client to
> > drop,
> > > I thought that ActiveMQ 5.2.0 used failover by default when you use a
> URL
> > > such as:
> > >
> > > tcp://localhost:61616
> > >
> > > Since according to the release page it says:
> > >
> > > "The default ActiveMQConnectionFactory<
> > >
> >
> http://activemq.apache.org/maven/activemq-core/apidocs/org/apache/activemq/ActiveMQConnectionFactory.html
> > > >brokerUrl
> > > now uses the failover
> > > transport <
> http://activemq.apache.org/failover-transport-reference.html
> > >."
> > >
> > > Am I mistaken on that?  Or do I still need to use the failover URL?  Is
> > it
> > > common for a consumer to lose a connection like this and using a
> failover
> > > URL is all I need to put back in?  I never saw this problem when using
> > > earlier versions of ActiveMQ with failover.  Since I moved to 5.2, I
> > > removed
> > > the failover part of the URL because I thought 5.2 used it by default.
> >  Any
> > > clarification on this would be helpful, or even a suggestion on how to
> > > troubleshoot the issue.  It seems like the only way I might be able to
> > get
> > > some log output to help with the problem is by turning on debug mode?
> > >
> > > Thanks for any help!
> > >
> > > Ryan
> > >
> >
> >
> >
> > --
> > http://blog.garytully.com
> >
> > Open Source SOA
> > http://FUSESource.com
> >
>



-- 
http://blog.garytully.com

Open Source SOA
http://FUSESource.com

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