Thanks Justin. So I should try below configuration then and see if it fixes my 
issue.

<address-setting match="myTopic">
        <auto-delete-created-queues>true</auto-delete-created-queues>
        <auto-delete-queues-delay>3600000</auto-delete-queues-delay>
        <auto-delete-queues-message-count>-1</auto-delete-queues-message-count> 
</address-setting>

Best Regards,
Shiv

-----Original Message-----
From: Justin Bertram <jbert...@apache.org> 
Sent: Wednesday, October 11, 2023 12:41 AM
To: users@activemq.apache.org
Subject: Re: Automatically removing inactive durable topic subscribers



CAUTION: EXTERNAL EMAIL - Sent from an email domain that is not formally 
trusted by Eurofins.

Do not click on links or open attachments unless you recognise the sender and 
are certain that the content is safe.

I forgot to include this for the configuration where you want to automatically 
delete queues from durable JMS subscriptions:

  <auto-delete-created-queues>true</auto-delete-created-queues>


Justin

On Tue, Oct 10, 2023 at 8:46 AM Justin Bertram <jbert...@apache.org> wrote:

> Yes. You can use a combination of the following address-settings:
>
>  - <auto-delete-queues>
>  - <auto-delete-queues-delay>
>  - <auto-delete-queues-message-count>
>
> For example, if you wanted to remove queues (e.g. from durable
> subscriptions) on the address "myTopic" (e.g. that was being used as a 
> JMS
> topic) then you might configure something like this:
>
>    <address-setting match="myTopic">
>       <auto-delete-queues>true</auto-delete-queues>
>       <auto-delete-queues-delay>3600000</auto-delete-queues-delay>
>
> <auto-delete-queues-message-count>-1</auto-delete-queues-message-count>
>    </address-setting>
>
> This would delete queues that hadn't had a consumer connect to them in 
> an hour regardless of how many messages the queue had. See the 
> documentation [1] for more details.
>
>
> Justin
>
> [1]
> https://fra01.safelinks.protection.outlook.com/?url=https%3A%2F%2Facti
> vemq.apache.org%2Fcomponents%2Fartemis%2Fdocumentation%2Flatest%2Faddr
> ess-settings.html%23address-settings&data=05%7C01%7CShivKumarDixit%40e
> urofins.com%7Cf8ae6c66ce7e4a5e813408dbc9c4d2d0%7C5e94ad53ff9d4e369b4c9
> d99a43d0cca%7C0%7C0%7C638325619406121913%7CUnknown%7CTWFpbGZsb3d8eyJWI
> joiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7
> C%7C%7C&sdata=q60Gpa3xxKFULinTNBBUTzNUL2VwiuGhI3%2BxOMSydBg%3D&reserve
> d=0
>
> On Tue, Oct 10, 2023 at 6:47 AM Shiv Kumar Dixit 
> <shivkumardi...@eurofins.com.invalid> wrote:
>
>> Hi,
>> If there a way in Artemis broker to automatically remove inactive 
>> durable topic subscribers. E.g. check every hour of inactive 
>> subscribers and remove the one who are not active for last 12 hours.
>>
>> Classic ActiveMQ has some configuration (
>> https://fra01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fact
>> ivemq.apache.org%2Fmanage-durable-subscribers&data=05%7C01%7CShivKumarDixit%40eurofins.com%7Cf8ae6c66ce7e4a5e813408dbc9c4d2d0%7C5e94ad53ff9d4e369b4c9d99a43d0cca%7C0%7C0%7C638325619406121913%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Liyet6TVpLDi%2FeoPkBqMnwnwNUl7CqUS81nZyiw7p0M%3D&reserved=0)
>>  for this but do we have similar in Artemis as well?
>>
>> Best Regards,
>> Shiv
>>
>>

Reply via email to