You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Wei Zheng <tj...@gmail.com> on 2021/04/20 02:02:51 UTC

Inquiring about

To whom this may concern,

Sorry,
I have enabled the ActiveMQ Broker for MQTT,
and i want to set timeout to 60 sec.
so I set it as below, but it doesn't work.
you know there are many option can be set for timeout,
It would be helpful if you could tell me about setting mistakes or setting
methods.
Thanks.
--------------
<transportConnector name="openwire" uri="tcp://
0.0.0.0:61616?transport.maximumConnections=1000&amp
<http://0.0.0.0:61616/?transport.maximumConnections=1000&amp>;
wireFormat.maxFrameSize=104857600&amp;
transport.keepAlive=false&amp;
wireFormat.maxInactivityDuration=720000&amp;
transport.connectionTimeout=1200000"/>
<transportConnector name="mqtt" uri="mqtt://
0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0
<http://0.0.0.0:1883/?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0>
"/>

Re: Inquiring about

Posted by Tim Bain <tb...@alumni.duke.edu>.
One way to do that would be to use netstat just before and just after the
disconnection, to show that the TCP connection is gone. Is that the sort of
thing you're looking for?

Tim

On Thu, May 6, 2021, 10:29 PM Wei Zheng <tj...@gmail.com> wrote:

> Hi Tim
>
> Thanks for your reply.
> Even if  i set the timeout option as following,  I can't ensure that the
> broker closed a client
> connection.
> Can you tell me how to confirm the disconnection when the timeout has
> expired?
>
> -------------------------------------------------------------------------------------
> <transportConnector name="openwire" uri="tcp://
> 0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=10000&amp;transport.keepAlive=false&amp;transport.connectionTimeout=5000&amp;transport.soTimeout=5000&amp;transport.useKeepAlive=false&amp;transport.defaultKeepAlive=0
> "/>
> <transportConnector name="mqtt" uri="mqtt://
> 0.0.0.0:18830?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=10000transport.keepAlive=false&amp;transport.connectionTimeout=5000&amp;transport.soTimeout=5000&amp;transport.useKeepAlive=false&amp;transport.defaultKeepAlive=0
> "/>
>
> 2021年4月20日(火) 20:41 Tim Bain <tb...@alumni.duke.edu>:
>
>> I think you're asking how to ensure that the broker will close a client
>> connection if that connection is idle for 60s or longer. If so, that
>> setting is the wireFormat.maxInactivityDuration element of the URIs you
>> provided, and you'll want to change the current value of 0 to 60000
>> (milliseconds) for the transportConnector representing whichever
>> protocol(s) you want to change. From your description, that's at least
>> MQTT, and you'll need to decide whether to make the same change for
>> OpenWire.
>>
>> Tim
>>
>> On Mon, Apr 19, 2021, 8:03 PM Wei Zheng <tj...@gmail.com> wrote:
>>
>> > To whom this may concern,
>> >
>> > Sorry,
>> > I have enabled the ActiveMQ Broker for MQTT,
>> > and i want to set timeout to 60 sec.
>> > so I set it as below, but it doesn't work.
>> > you know there are many option can be set for timeout,
>> > It would be helpful if you could tell me about setting mistakes or
>> setting
>> > methods.
>> > Thanks.
>> > --------------
>> > <transportConnector name="openwire" uri="tcp://
>> > 0.0.0.0:61616?transport.maximumConnections=1000&amp
>> > <http://0.0.0.0:61616/?transport.maximumConnections=1000&amp>;
>> > wireFormat.maxFrameSize=104857600&amp;
>> > transport.keepAlive=false&amp;
>> > wireFormat.maxInactivityDuration=720000&amp;
>> > transport.connectionTimeout=1200000"/>
>> > <transportConnector name="mqtt" uri="mqtt://
>> >
>> >
>> 0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0
>> > <
>> >
>> http://0.0.0.0:1883/?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0
>> > >
>> > "/>
>> >
>>
>

Re: Inquiring about

Posted by Wei Zheng <tj...@gmail.com>.
Hi Tim

Thanks for your reply.
Even if  i set the timeout option as following,  I can't ensure that the
broker closed a client
connection.
Can you tell me how to confirm the disconnection when the timeout has
expired?
-------------------------------------------------------------------------------------
<transportConnector name="openwire" uri="tcp://
0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=10000&amp;transport.keepAlive=false&amp;transport.connectionTimeout=5000&amp;transport.soTimeout=5000&amp;transport.useKeepAlive=false&amp;transport.defaultKeepAlive=0
"/>
<transportConnector name="mqtt" uri="mqtt://
0.0.0.0:18830?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=10000transport.keepAlive=false&amp;transport.connectionTimeout=5000&amp;transport.soTimeout=5000&amp;transport.useKeepAlive=false&amp;transport.defaultKeepAlive=0
"/>

2021年4月20日(火) 20:41 Tim Bain <tb...@alumni.duke.edu>:

> I think you're asking how to ensure that the broker will close a client
> connection if that connection is idle for 60s or longer. If so, that
> setting is the wireFormat.maxInactivityDuration element of the URIs you
> provided, and you'll want to change the current value of 0 to 60000
> (milliseconds) for the transportConnector representing whichever
> protocol(s) you want to change. From your description, that's at least
> MQTT, and you'll need to decide whether to make the same change for
> OpenWire.
>
> Tim
>
> On Mon, Apr 19, 2021, 8:03 PM Wei Zheng <tj...@gmail.com> wrote:
>
> > To whom this may concern,
> >
> > Sorry,
> > I have enabled the ActiveMQ Broker for MQTT,
> > and i want to set timeout to 60 sec.
> > so I set it as below, but it doesn't work.
> > you know there are many option can be set for timeout,
> > It would be helpful if you could tell me about setting mistakes or
> setting
> > methods.
> > Thanks.
> > --------------
> > <transportConnector name="openwire" uri="tcp://
> > 0.0.0.0:61616?transport.maximumConnections=1000&amp
> > <http://0.0.0.0:61616/?transport.maximumConnections=1000&amp>;
> > wireFormat.maxFrameSize=104857600&amp;
> > transport.keepAlive=false&amp;
> > wireFormat.maxInactivityDuration=720000&amp;
> > transport.connectionTimeout=1200000"/>
> > <transportConnector name="mqtt" uri="mqtt://
> >
> >
> 0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0
> > <
> >
> http://0.0.0.0:1883/?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0
> > >
> > "/>
> >
>

Re: Inquiring about

Posted by Tim Bain <tb...@alumni.duke.edu>.
I think you're asking how to ensure that the broker will close a client
connection if that connection is idle for 60s or longer. If so, that
setting is the wireFormat.maxInactivityDuration element of the URIs you
provided, and you'll want to change the current value of 0 to 60000
(milliseconds) for the transportConnector representing whichever
protocol(s) you want to change. From your description, that's at least
MQTT, and you'll need to decide whether to make the same change for
OpenWire.

Tim

On Mon, Apr 19, 2021, 8:03 PM Wei Zheng <tj...@gmail.com> wrote:

> To whom this may concern,
>
> Sorry,
> I have enabled the ActiveMQ Broker for MQTT,
> and i want to set timeout to 60 sec.
> so I set it as below, but it doesn't work.
> you know there are many option can be set for timeout,
> It would be helpful if you could tell me about setting mistakes or setting
> methods.
> Thanks.
> --------------
> <transportConnector name="openwire" uri="tcp://
> 0.0.0.0:61616?transport.maximumConnections=1000&amp
> <http://0.0.0.0:61616/?transport.maximumConnections=1000&amp>;
> wireFormat.maxFrameSize=104857600&amp;
> transport.keepAlive=false&amp;
> wireFormat.maxInactivityDuration=720000&amp;
> transport.connectionTimeout=1200000"/>
> <transportConnector name="mqtt" uri="mqtt://
>
> 0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0
> <
> http://0.0.0.0:1883/?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600&amp;wireFormat.maxInactivityDuration=0
> >
> "/>
>