You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by John Peter <mr...@yahoo.com> on 2010/08/16 08:45:55 UTC

TransportListener callback

Hi Guys,

We use TransportListener for Broker Up/Down Status detection and around 20
ActiveMQ Broker statuses need to be continuously monitored. Since network is
non reliable, we receive the transportInterupted/ transportResumed are being
called very frequently 

My Question is
1) is TransportListener callback class running in separate Thread ? and
Which Context?

 Thanks and Regards,
 John Peter.
-- 
View this message in context: http://old.nabble.com/TransportListener-callback-tp29447156p29447156.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: TransportListener callback

Posted by Gary Tully <ga...@gmail.com>.
they will be called from different threads. The interrupted callback
will use the calling thread, the send thread, and the resumedCallback
will be called from the failover transport reconnect thread once the
connection is reestablished. The  resumedCallback will only be called
after the interrupted callback.
So there will always be a thread switch between the resumed and
onMessage callback

On 16 August 2010 12:46, vv <va...@gmail.com> wrote:
>
> Hi,
>
> Does the TransportListener & the Rx Message Listener(OnMessage) be called
> from the same thread/context? during a transient link down/up event will the
> transportInterrupted & transportResumed ,onmessage callback function be
> called simulataneously. i.e. can there be a thread switching between the
> processing of transportresumed & the onmessage callback processing.
>
>
> Dejan Bosanac wrote:
>>
>> Hi John,
>>
>> TransportListener doesn't monitor if broker is going up and down, but
>> monitors the status of your client's connection. It's set on the
>> connection and it only provides a mechanism for the connection to
>> notify your application on the events. It doesn't require any separate
>> thread or context.
>>
>> Cheers
>> --
>> Dejan Bosanac - http://twitter.com/dejanb
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>>
>>
>> On Mon, Aug 16, 2010 at 8:45 AM, John Peter <mr...@yahoo.com> wrote:
>>>
>>> Hi Guys,
>>>
>>> We use TransportListener for Broker Up/Down Status detection and around
>>> 20
>>> ActiveMQ Broker statuses need to be continuously monitored. Since network
>>> is
>>> non reliable, we receive the transportInterupted/ transportResumed are
>>> being
>>> called very frequently
>>>
>>> My Question is
>>> 1) is TransportListener callback class running in separate Thread ? and
>>> Which Context?
>>>
>>>  Thanks and Regards,
>>>  John Peter.
>>> --
>>> View this message in context:
>>> http://old.nabble.com/TransportListener-callback-tp29447156p29447156.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> -----
>> Dejan Bosanac
>>
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>>
>
> --
> View this message in context: http://old.nabble.com/TransportListener-callback-tp29447156p29449111.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: TransportListener callback

Posted by Gary Tully <ga...@gmail.com>.
should not, check out the source:
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?view=markup
the reconnect mutex.

On 16 August 2010 13:01, vv <va...@gmail.com> wrote:
>
> Can any out of order processing of the Transport Listener
> events(interrupted/resumed) and onMessage callback happen?
>
> i.e. if the link is unstable, and at the same time the producer keeps
> sending the messages to the consumer..
>
>
> vv wrote:
>>
>> Hi,
>>
>> Does the TransportListener & the Rx Message Listener(OnMessage) be called
>> from the same thread/context? during a transient link down/up event will
>> the transportInterrupted & transportResumed ,onmessage callback function
>> be called simulataneously. i.e. can there be a thread switching between
>> the processing of transportresumed & the onmessage callback processing.
>>
>>
>> Dejan Bosanac wrote:
>>>
>>> Hi John,
>>>
>>> TransportListener doesn't monitor if broker is going up and down, but
>>> monitors the status of your client's connection. It's set on the
>>> connection and it only provides a mechanism for the connection to
>>> notify your application on the events. It doesn't require any separate
>>> thread or context.
>>>
>>> Cheers
>>> --
>>> Dejan Bosanac - http://twitter.com/dejanb
>>>
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>>
>>>
>>>
>>> On Mon, Aug 16, 2010 at 8:45 AM, John Peter <mr...@yahoo.com> wrote:
>>>>
>>>> Hi Guys,
>>>>
>>>> We use TransportListener for Broker Up/Down Status detection and around
>>>> 20
>>>> ActiveMQ Broker statuses need to be continuously monitored. Since
>>>> network is
>>>> non reliable, we receive the transportInterupted/ transportResumed are
>>>> being
>>>> called very frequently
>>>>
>>>> My Question is
>>>> 1) is TransportListener callback class running in separate Thread ? and
>>>> Which Context?
>>>>
>>>>  Thanks and Regards,
>>>>  John Peter.
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/TransportListener-callback-tp29447156p29447156.html
>>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>> -----
>>> Dejan Bosanac
>>>
>>> Open Source Integration - http://fusesource.com/
>>> ActiveMQ in Action - http://www.manning.com/snyder/
>>> Blog - http://www.nighttale.net
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/TransportListener-callback-tp29447156p29449143.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Re: TransportListener callback

Posted by vv <va...@gmail.com>.
Can any out of order processing of the Transport Listener
events(interrupted/resumed) and onMessage callback happen?

i.e. if the link is unstable, and at the same time the producer keeps
sending the messages to the consumer..


vv wrote:
> 
> Hi,
> 
> Does the TransportListener & the Rx Message Listener(OnMessage) be called
> from the same thread/context? during a transient link down/up event will
> the transportInterrupted & transportResumed ,onmessage callback function
> be called simulataneously. i.e. can there be a thread switching between
> the processing of transportresumed & the onmessage callback processing.
> 
> 
> Dejan Bosanac wrote:
>> 
>> Hi John,
>> 
>> TransportListener doesn't monitor if broker is going up and down, but
>> monitors the status of your client's connection. It's set on the
>> connection and it only provides a mechanism for the connection to
>> notify your application on the events. It doesn't require any separate
>> thread or context.
>> 
>> Cheers
>> --
>> Dejan Bosanac - http://twitter.com/dejanb
>> 
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>> 
>> 
>> 
>> On Mon, Aug 16, 2010 at 8:45 AM, John Peter <mr...@yahoo.com> wrote:
>>>
>>> Hi Guys,
>>>
>>> We use TransportListener for Broker Up/Down Status detection and around
>>> 20
>>> ActiveMQ Broker statuses need to be continuously monitored. Since
>>> network is
>>> non reliable, we receive the transportInterupted/ transportResumed are
>>> being
>>> called very frequently
>>>
>>> My Question is
>>> 1) is TransportListener callback class running in separate Thread ? and
>>> Which Context?
>>>
>>>  Thanks and Regards,
>>>  John Peter.
>>> --
>>> View this message in context:
>>> http://old.nabble.com/TransportListener-callback-tp29447156p29447156.html
>>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -----
>> Dejan Bosanac
>> 
>> Open Source Integration - http://fusesource.com/
>> ActiveMQ in Action - http://www.manning.com/snyder/
>> Blog - http://www.nighttale.net
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/TransportListener-callback-tp29447156p29449143.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: TransportListener callback

Posted by vv <va...@gmail.com>.
Hi,

Does the TransportListener & the Rx Message Listener(OnMessage) be called
from the same thread/context? during a transient link down/up event will the
transportInterrupted & transportResumed ,onmessage callback function be
called simulataneously. i.e. can there be a thread switching between the
processing of transportresumed & the onmessage callback processing.


Dejan Bosanac wrote:
> 
> Hi John,
> 
> TransportListener doesn't monitor if broker is going up and down, but
> monitors the status of your client's connection. It's set on the
> connection and it only provides a mechanism for the connection to
> notify your application on the events. It doesn't require any separate
> thread or context.
> 
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> 
> On Mon, Aug 16, 2010 at 8:45 AM, John Peter <mr...@yahoo.com> wrote:
>>
>> Hi Guys,
>>
>> We use TransportListener for Broker Up/Down Status detection and around
>> 20
>> ActiveMQ Broker statuses need to be continuously monitored. Since network
>> is
>> non reliable, we receive the transportInterupted/ transportResumed are
>> being
>> called very frequently
>>
>> My Question is
>> 1) is TransportListener callback class running in separate Thread ? and
>> Which Context?
>>
>>  Thanks and Regards,
>>  John Peter.
>> --
>> View this message in context:
>> http://old.nabble.com/TransportListener-callback-tp29447156p29447156.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 

-- 
View this message in context: http://old.nabble.com/TransportListener-callback-tp29447156p29449111.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: TransportListener callback

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi John,

TransportListener doesn't monitor if broker is going up and down, but
monitors the status of your client's connection. It's set on the
connection and it only provides a mechanism for the connection to
notify your application on the events. It doesn't require any separate
thread or context.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net



On Mon, Aug 16, 2010 at 8:45 AM, John Peter <mr...@yahoo.com> wrote:
>
> Hi Guys,
>
> We use TransportListener for Broker Up/Down Status detection and around 20
> ActiveMQ Broker statuses need to be continuously monitored. Since network is
> non reliable, we receive the transportInterupted/ transportResumed are being
> called very frequently
>
> My Question is
> 1) is TransportListener callback class running in separate Thread ? and
> Which Context?
>
>  Thanks and Regards,
>  John Peter.
> --
> View this message in context: http://old.nabble.com/TransportListener-callback-tp29447156p29447156.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>