There may very well be a bug in the implementation of the InactivityMonitor
code in ActiveMQCPP compared to the Java implementation; I'd recommend you
submit a bug in JIRA, ideally with the client code that produces this
behavior.  This one may be harder for someone to track down, because I
don't know of a way to reliably produce "Channel was inactive for too
long." exceptions.  (If someone knows of a good way to do that, I'd love to
know it.)

Once this occurs, if you stop your application (but leave the broker up)
and start a new one, does that eliminate the error?  Knowing that will let
us determine whether the bad state is in the client or in the broker.

I can't think of any URI options that would help you work around the issue,
though if the restart I asked about in the previous paragraph results in
correct behavior, you could simply exit when you detect the problem and
have the script that started it recognize that it was dead and start a
fresh one.  It's not a great workaround, but it might be better than what
you have right now.  Or of course you could turn off inactivity monitoring;
you said you don't want to do that, but it might be better than the other
alternatives, at least till someone figures out what's going on and
implements a fix.

Tim

On Wed, Jun 17, 2015 at 1:25 PM, jeffrey <jeffreyhasm...@hotmail.com> wrote:

> Tim,
>
> I'm not sure if the Java application ever gets the exception, but if it is,
> then it's reconnecting quickly.
>
> I don't think my application can really control which port it is getting
> moved to, that would be decided after I connect to the server on 61616 and
> we negotiate to a new port.
>
> Are there any transport connector options on the client or server that
> could
> help me here?
>
> Thanks,
> Jeffrey
>
>
> Tim Bain wrote
> > Do you ever get the channel inactivity exception in the Java client?  If
> > so, does it reconnect gracefully?
> >
> > Those error messages make it sound like the TCP connection is being
> reused
> > instead of starting a fresh one.  Is there any chance you're reusing the
> > same ephemeral port, where the server wouldn't be able to tell that it
> > wasn't simply additional data on the old connection?
> >
> > Tim
>
>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/unable-to-reconnect-after-exception-Channel-was-inactive-for-too-long-tp4697843p4697923.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Reply via email to