You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by xabhi <xa...@gmail.com> on 2015/11/24 08:50:46 UTC

Understanding ActiveMQ Inactivity timeout monitor in STOMP

Hi,

Below is my ActiveMQ configuration file. I have specified
wireFormat.maxInactivityDuration for TCP Nio transport. Does this inactivity
timeout applies to STOMP connector as well?

I am seeing cases where if my STOMP client is busy for more than 5 mins in
doing some operation and doesn't send heartbeats, ActiveMQ closes that
connection. Does broker logs anything for indicating this timeout?
Another confusing thing is why does timeout happens only after 5 mins, if it
uses same inactivity value the timeout should happen after 2 mins, right?

Could anyone please explain this behavior?


<amq:transportConnectors>
            <amq:transportConnector name=&quot;mqbrokerTcpNioTransport&quot; 
                                   
uri=&quot;nio://0.0.0.0:61616?&lt;b>wireFormat.maxInactivityDuration=120000&*amp;maximumConnections=600&amp;wireFormat.maxFrameSize=157286400"
                                   
maximumProducersAllowedPerConnection="200"
                                   
maximumConsumersAllowedPerConnection="200" />
     
            <amq:transportConnector name="mqbrokerStompNioTransport" 
                                   
uri="stomp+nio://0.0.0.0:61613?maximumConnections=100&amp;transport.maxDataLength=157286400"                             
                                   
maximumProducersAllowedPerConnection="200"
                                   
maximumConsumersAllowedPerConnection="200" />
        </amq:transportConnectors>


Thanks,
Abhi




--
View this message in context: http://activemq.2283324.n4.nabble.com/Understanding-ActiveMQ-Inactivity-timeout-monitor-in-STOMP-tp4704227.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Understanding ActiveMQ Inactivity timeout monitor in STOMP

Posted by Timothy Bish <ta...@gmail.com>.
First thing would be to test against 5.12.1

On 11/25/2015 10:01 AM, xabhi wrote:
> I am using ActiveMQ v5.11.1
>
> Below are the STOMP frames sent/received from client/server.
>
> # Net::STOMP::Client->connect()
> #  encoded CONNECT frame
> #   H client-id:test_perl_consumer_huygens01-test_stomp_consumer
> #   H passcode:
> #   H host:mqbrokerdev
> #   H accept-version:1.0,1.1
> #   H login:
> #   sent 141 bytes
> #   received 135 bytes
> #  decoding CONNECTED frame
> #   H server:ActiveMQ/5.11.1
> #   H heart-beat:0,0
> #   H session:test_perl_consumer_huygens01-test_stomp_consumer
> #   H version:1.1
>
> # Net::STOMP::Client->subscribe()
> #  encoded SUBSCRIBE frame
> #   H activemq.prefetchSize:10000
> #   H
> activemq.subscriptionName:test_perl_consumer_huygens01-test_stomp_consumer
> #   H ack:client
> #   H destination:/topic/test
> #   H callback:CODE(0x33a1188)
> #   H id:/topic/test-huygens01-15146-stomp_consumer.pl
> #   sent 254 bytes
> Subscribed to /topic/test
>
> Thanks,
> Abhi
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Understanding-ActiveMQ-Inactivity-timeout-monitor-in-STOMP-tp4704227p4704280.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: Understanding ActiveMQ Inactivity timeout monitor in STOMP

Posted by xabhi <xa...@gmail.com>.
I am using ActiveMQ v5.11.1

Below are the STOMP frames sent/received from client/server.

# Net::STOMP::Client->connect()
#  encoded CONNECT frame
#   H client-id:test_perl_consumer_huygens01-test_stomp_consumer
#   H passcode:
#   H host:mqbrokerdev
#   H accept-version:1.0,1.1
#   H login:
#   sent 141 bytes
#   received 135 bytes
#  decoding CONNECTED frame
#   H server:ActiveMQ/5.11.1
#   H heart-beat:0,0
#   H session:test_perl_consumer_huygens01-test_stomp_consumer
#   H version:1.1

# Net::STOMP::Client->subscribe()
#  encoded SUBSCRIBE frame
#   H activemq.prefetchSize:10000
#   H
activemq.subscriptionName:test_perl_consumer_huygens01-test_stomp_consumer
#   H ack:client
#   H destination:/topic/test
#   H callback:CODE(0x33a1188)
#   H id:/topic/test-huygens01-15146-stomp_consumer.pl
#   sent 254 bytes
Subscribed to /topic/test

Thanks,
Abhi




--
View this message in context: http://activemq.2283324.n4.nabble.com/Understanding-ActiveMQ-Inactivity-timeout-monitor-in-STOMP-tp4704227p4704280.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Understanding ActiveMQ Inactivity timeout monitor in STOMP

Posted by Timothy Bish <ta...@gmail.com>.
Configuration from one transportConnector does not translate over to any
other connector. 

What does you STOMP client send in its CONNECT frame for the heart-beat
value?
What broker version are you running?

On 11/24/2015 02:50 AM, xabhi wrote:
> Hi,
>
> Below is my ActiveMQ configuration file. I have specified
> wireFormat.maxInactivityDuration for TCP Nio transport. Does this inactivity
> timeout applies to STOMP connector as well?
>
> I am seeing cases where if my STOMP client is busy for more than 5 mins in
> doing some operation and doesn't send heartbeats, ActiveMQ closes that
> connection. Does broker logs anything for indicating this timeout?
> Another confusing thing is why does timeout happens only after 5 mins, if it
> uses same inactivity value the timeout should happen after 2 mins, right?
>
> Could anyone please explain this behavior?
>
>
> <amq:transportConnectors>
>             <amq:transportConnector name=&quot;mqbrokerTcpNioTransport&quot; 
>                                    
> uri=&quot;nio://0.0.0.0:61616?&lt;b>wireFormat.maxInactivityDuration=120000&*amp;maximumConnections=600&amp;wireFormat.maxFrameSize=157286400"
>                                    
> maximumProducersAllowedPerConnection="200"
>                                    
> maximumConsumersAllowedPerConnection="200" />
>      
>             <amq:transportConnector name="mqbrokerStompNioTransport" 
>                                    
> uri="stomp+nio://0.0.0.0:61613?maximumConnections=100&amp;transport.maxDataLength=157286400"                             
>                                    
> maximumProducersAllowedPerConnection="200"
>                                    
> maximumConsumersAllowedPerConnection="200" />
>         </amq:transportConnectors>
>
>
> Thanks,
> Abhi
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Understanding-ActiveMQ-Inactivity-timeout-monitor-in-STOMP-tp4704227.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com 
twitter: @tabish121
blog: http://timbish.blogspot.com/