ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Achilles
Hey all,
Currently i am using ActiveMQ 5.15.2 and metrics are exposed using a JMX
agent
org_apache_activemq_Broker_CurrentConnectionsCount
using above metric i can see that number of connections to my broker is
around 850
but when i check the OS level connection by doing *netstat *i can see only
200 connections.
when digging further i can see that i have too many inactive
connections in *Active
Non-Durable Topic Subscribers *(in subscribers tab) and when i click on the
clientID i get

No connection could be found for ID ID:client_id-random_number



And all these inactive clients are subscribed to topic
ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic

What can be the reason for this issue ??
and how to solve this issue?
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Tim Bain
This sounds like a bug, since the closure of the inactive connections
doesn't seem to remove the associated subscriptions nor reduce the JMX
count accordingly. Can you please submit a bug in JIRA for this behavior?

Are you able to reproduce the problem on demand, ideally on a single broker
with minimal customization? If so, please attach the broker configuration
file and describe what needs to be done with the consumers to reproduce the
issue.

Thanks,
Tim

On Sun, Apr 4, 2021, 9:47 PM Prameet Patil <[hidden email]> wrote:

> Hey all,
> Currently i am using ActiveMQ 5.15.2 and metrics are exposed using a JMX
> agent
> org_apache_activemq_Broker_CurrentConnectionsCount
> using above metric i can see that number of connections to my broker is
> around 850
> but when i check the OS level connection by doing *netstat *i can see only
> 200 connections.
> when digging further i can see that i have too many inactive
> connections in *Active
> Non-Durable Topic Subscribers *(in subscribers tab) and when i click on the
> clientID i get
>
> No connection could be found for ID ID:client_id-random_number
>
>
>
> And all these inactive clients are subscribed to topic
> ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
>
> What can be the reason for this issue ??
> and how to solve this issue?
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Achilles
hmm ok
Why only I see these stale connections in the topic
ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic ????

rest all topics and queues look good.
only this particular Topic has stale connections.

On Wed, Apr 7, 2021 at 5:40 PM Tim Bain <[hidden email]> wrote:

> This sounds like a bug, since the closure of the inactive connections
> doesn't seem to remove the associated subscriptions nor reduce the JMX
> count accordingly. Can you please submit a bug in JIRA for this behavior?
>
> Are you able to reproduce the problem on demand, ideally on a single broker
> with minimal customization? If so, please attach the broker configuration
> file and describe what needs to be done with the consumers to reproduce the
> issue.
>
> Thanks,
> Tim
>
> On Sun, Apr 4, 2021, 9:47 PM Prameet Patil <[hidden email]>
> wrote:
>
> > Hey all,
> > Currently i am using ActiveMQ 5.15.2 and metrics are exposed using a JMX
> > agent
> > org_apache_activemq_Broker_CurrentConnectionsCount
> > using above metric i can see that number of connections to my broker is
> > around 850
> > but when i check the OS level connection by doing *netstat *i can see
> only
> > 200 connections.
> > when digging further i can see that i have too many inactive
> > connections in *Active
> > Non-Durable Topic Subscribers *(in subscribers tab) and when i click on
> the
> > clientID i get
> >
> > No connection could be found for ID ID:client_id-random_number
> >
> >
> >
> > And all these inactive clients are subscribed to topic
> > ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
> >
> > What can be the reason for this issue ??
> > and how to solve this issue?
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Achilles
Also what is the impact on the broker or clients if I delete the above
topic ?


On Sun, Apr 11, 2021 at 9:08 AM Prameet Patil <[hidden email]>
wrote:

> hmm ok
> Why only I see these stale connections in the topic
> ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic ????
>
> rest all topics and queues look good.
> only this particular Topic has stale connections.
>
> On Wed, Apr 7, 2021 at 5:40 PM Tim Bain <[hidden email]> wrote:
>
>> This sounds like a bug, since the closure of the inactive connections
>> doesn't seem to remove the associated subscriptions nor reduce the JMX
>> count accordingly. Can you please submit a bug in JIRA for this behavior?
>>
>> Are you able to reproduce the problem on demand, ideally on a single
>> broker
>> with minimal customization? If so, please attach the broker configuration
>> file and describe what needs to be done with the consumers to reproduce
>> the
>> issue.
>>
>> Thanks,
>> Tim
>>
>> On Sun, Apr 4, 2021, 9:47 PM Prameet Patil <[hidden email]>
>> wrote:
>>
>> > Hey all,
>> > Currently i am using ActiveMQ 5.15.2 and metrics are exposed using a JMX
>> > agent
>> > org_apache_activemq_Broker_CurrentConnectionsCount
>> > using above metric i can see that number of connections to my broker is
>> > around 850
>> > but when i check the OS level connection by doing *netstat *i can see
>> only
>> > 200 connections.
>> > when digging further i can see that i have too many inactive
>> > connections in *Active
>> > Non-Durable Topic Subscribers *(in subscribers tab) and when i click on
>> the
>> > clientID i get
>> >
>> > No connection could be found for ID ID:client_id-random_number
>> >
>> >
>> >
>> > And all these inactive clients are subscribed to topic
>> > ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
>> >
>> > What can be the reason for this issue ??
>> > and how to solve this issue?
>> >
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

jbonofre
Hi,

With ActiveMQ, by default, the topic will be recreated when a client uses it.

Regards
JB

> Le 11 avr. 2021 à 05:43, Prameet Patil <[hidden email]> a écrit :
>
> Also what is the impact on the broker or clients if I delete the above
> topic ?
>
>
> On Sun, Apr 11, 2021 at 9:08 AM Prameet Patil <[hidden email]>
> wrote:
>
>> hmm ok
>> Why only I see these stale connections in the topic
>> ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic ????
>>
>> rest all topics and queues look good.
>> only this particular Topic has stale connections.
>>
>> On Wed, Apr 7, 2021 at 5:40 PM Tim Bain <[hidden email]> wrote:
>>
>>> This sounds like a bug, since the closure of the inactive connections
>>> doesn't seem to remove the associated subscriptions nor reduce the JMX
>>> count accordingly. Can you please submit a bug in JIRA for this behavior?
>>>
>>> Are you able to reproduce the problem on demand, ideally on a single
>>> broker
>>> with minimal customization? If so, please attach the broker configuration
>>> file and describe what needs to be done with the consumers to reproduce
>>> the
>>> issue.
>>>
>>> Thanks,
>>> Tim
>>>
>>> On Sun, Apr 4, 2021, 9:47 PM Prameet Patil <[hidden email]>
>>> wrote:
>>>
>>>> Hey all,
>>>> Currently i am using ActiveMQ 5.15.2 and metrics are exposed using a JMX
>>>> agent
>>>> org_apache_activemq_Broker_CurrentConnectionsCount
>>>> using above metric i can see that number of connections to my broker is
>>>> around 850
>>>> but when i check the OS level connection by doing *netstat *i can see
>>> only
>>>> 200 connections.
>>>> when digging further i can see that i have too many inactive
>>>> connections in *Active
>>>> Non-Durable Topic Subscribers *(in subscribers tab) and when i click on
>>> the
>>>> clientID i get
>>>>
>>>> No connection could be found for ID ID:client_id-random_number
>>>>
>>>>
>>>>
>>>> And all these inactive clients are subscribed to topic
>>>> ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
>>>>
>>>> What can be the reason for this issue ??
>>>> and how to solve this issue?
>>>>
>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Achilles
We are not specifically using this topic.
it looks like activemq itself uses it.
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

jbonofre
I meant that as soon as you use it on a client (subscriber or publisher), ActiveMQ creates the topic.

That’s for normal topic.

For the AdvisoryTopic, you can just disable advisory support in activemq.xml:

<broker advisorySupport="false">

Then the advisory topics won’t be created.

Regards
JB

> Le 11 avr. 2021 à 07:31, Prameet Patil <[hidden email]> a écrit :
>
> We are not specifically using this topic.
> it looks like activemq itself uses it.

Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Achilles
ok, the topic  ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
looks like an advisory topic.
if i delete the above topic it will just be recreated right ???

On Sun, Apr 11, 2021 at 11:06 AM Jean-Baptiste Onofre <[hidden email]>
wrote:

> I meant that as soon as you use it on a client (subscriber or publisher),
> ActiveMQ creates the topic.
>
> That’s for normal topic.
>
> For the AdvisoryTopic, you can just disable advisory support in
> activemq.xml:
>
> <broker advisorySupport="false">
>
> Then the advisory topics won’t be created.
>
> Regards
> JB
>
> > Le 11 avr. 2021 à 07:31, Prameet Patil <[hidden email]> a
> écrit :
> >
> > We are not specifically using this topic.
> > it looks like activemq itself uses it.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

jbonofre
If you don’t disable advisory support, yes.

> Le 11 avr. 2021 à 07:47, Prameet Patil <[hidden email]> a écrit :
>
> ok, the topic  ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
> looks like an advisory topic.
> if i delete the above topic it will just be recreated right ???
>
>> On Sun, Apr 11, 2021 at 11:06 AM Jean-Baptiste Onofre <[hidden email]>
>> wrote:
>>
>> I meant that as soon as you use it on a client (subscriber or publisher),
>> ActiveMQ creates the topic.
>>
>> That’s for normal topic.
>>
>> For the AdvisoryTopic, you can just disable advisory support in
>> activemq.xml:
>>
>> <broker advisorySupport="false">
>>
>> Then the advisory topics won’t be created.
>>
>> Regards
>> JB
>>
>>> Le 11 avr. 2021 à 07:31, Prameet Patil <[hidden email]> a
>> écrit :
>>>
>>> We are not specifically using this topic.
>>> it looks like activemq itself uses it.
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Achilles
got it
thanks!!

On Sun, Apr 11, 2021 at 11:52 AM JB Onofré <[hidden email]> wrote:

> If you don’t disable advisory support, yes.
>
> > Le 11 avr. 2021 à 07:47, Prameet Patil <[hidden email]> a
> écrit :
> >
> > ok, the topic  ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
> > looks like an advisory topic.
> > if i delete the above topic it will just be recreated right ???
> >
> >> On Sun, Apr 11, 2021 at 11:06 AM Jean-Baptiste Onofre <[hidden email]>
> >> wrote:
> >>
> >> I meant that as soon as you use it on a client (subscriber or
> publisher),
> >> ActiveMQ creates the topic.
> >>
> >> That’s for normal topic.
> >>
> >> For the AdvisoryTopic, you can just disable advisory support in
> >> activemq.xml:
> >>
> >> <broker advisorySupport="false">
> >>
> >> Then the advisory topics won’t be created.
> >>
> >> Regards
> >> JB
> >>
> >>> Le 11 avr. 2021 à 07:31, Prameet Patil <[hidden email]> a
> >> écrit :
> >>>
> >>> We are not specifically using this topic.
> >>> it looks like activemq itself uses it.
> >>
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Tim Bain
Be sure you understand what advisory support actually gives you (i.e. what
you're giving up by turning it off) before you lock into this workaround as
a permanent solution. See https://activemq.apache.org/advisory-message for
more info.

Also, if you're able to reproduce the problem reliably, would you be
willing to submit a bug in JIRA with the details? This does sound like a
bug that would be worth fixing if you can show us how to reproduce it, even
if you're going to use the workaround.

Tim

On Sun, Apr 11, 2021, 12:40 AM Prameet Patil <[hidden email]>
wrote:

> got it
> thanks!!
>
> On Sun, Apr 11, 2021 at 11:52 AM JB Onofré <[hidden email]> wrote:
>
> > If you don’t disable advisory support, yes.
> >
> > > Le 11 avr. 2021 à 07:47, Prameet Patil <[hidden email]> a
> > écrit :
> > >
> > > ok, the topic  ActiveMQ.Advisory.TempQueue,ActiveMQ.Advisory.TempTopic
> > > looks like an advisory topic.
> > > if i delete the above topic it will just be recreated right ???
> > >
> > >> On Sun, Apr 11, 2021 at 11:06 AM Jean-Baptiste Onofre <
> [hidden email]>
> > >> wrote:
> > >>
> > >> I meant that as soon as you use it on a client (subscriber or
> > publisher),
> > >> ActiveMQ creates the topic.
> > >>
> > >> That’s for normal topic.
> > >>
> > >> For the AdvisoryTopic, you can just disable advisory support in
> > >> activemq.xml:
> > >>
> > >> <broker advisorySupport="false">
> > >>
> > >> Then the advisory topics won’t be created.
> > >>
> > >> Regards
> > >> JB
> > >>
> > >>> Le 11 avr. 2021 à 07:31, Prameet Patil <[hidden email]> a
> > >> écrit :
> > >>>
> > >>> We are not specifically using this topic.
> > >>> it looks like activemq itself uses it.
> > >>
> > >>
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Achilles
Yes definitely.
I don't have access to the source code of the JMS clients. so i am not sure
if i will be able to reproduce it in a clean environment.
but will definitely give it a try and create a JIRA if i can reproduce it.
Reply | Threaded
Open this post in threaded view
|

Re: ActiveMQ inactive connection in Active Non-Durable Topic Subscribers

Tim Bain
Sounds great, thank you.

Tim

On Sun, Apr 11, 2021, 7:16 AM Prameet Patil <[hidden email]>
wrote:

> Yes definitely.
> I don't have access to the source code of the JMS clients. so i am not sure
> if i will be able to reproduce it in a clean environment.
> but will definitely give it a try and create a JIRA if i can reproduce it.
>