Delete queues created for virtual topic consumers

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Delete queues created for virtual topic consumers

pol_ice
Hi there,

In my functional tests I have to create a unique consumer name for each test to be able to imitate a subscription to the virtual topic and receiving the messages from the queue. Since the same consumer name will not be used any other time and due to a long list of tests I would love to be able to delete those queues created for my testing consumers of virtual topics.

I have tried to use Session.DeleteDestination() but it had no effect on the queues automatically created for virtual topic consumers.

Am I missing something?

My project is developed in C# and Apache.NMS.ActiveMq.
Reply | Threaded
Open this post in threaded view
|

Re: Delete queues created for virtual topic consumers

gtully
http://activemq.apache.org/delete-inactive-destinations.html

On 3 August 2011 00:06, pol_ice <[hidden email]> wrote:

> Hi there,
>
> In my functional tests I have to create a unique consumer name for each test
> to be able to imitate a subscription to the virtual topic and receiving the
> messages from the queue. Since the same consumer name will not be used any
> other time and due to a long list of tests I would love to be able to delete
> those queues created for my testing consumers of virtual topics.
>
> I have tried to use *Session.DeleteDestination()* but it had no effect on
> the queues automatically created for virtual topic consumers.
>
> Am I missing something?
>
> My project is developed in *C#* and *Apache.NMS.ActiveMq*.
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Delete-queues-created-for-virtual-topic-consumers-tp3714004p3714004.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



--
http://fusesource.com
http://blog.garytully.com
Reply | Threaded
Open this post in threaded view
|

Re: Delete queues created for virtual topic consumers

pol_ice
Thanks Gary,

I thought it would be a method not a broker setting.
However it should work just fine when separating testing and production environments ( we will just need not to forget to reset auto removal settings when setting it up on production. )
Reply | Threaded
Open this post in threaded view
|

Re: Delete queues created for virtual topic consumers

pol_ice
One question though, will this setting delete the inactive queues with a number of pending messages?
Reply | Threaded
Open this post in threaded view
|

Re: Delete queues created for virtual topic consumers

gtully
no, they need to be empty to be candidates for garbage collection.

On 3 August 2011 16:52, pol_ice <[hidden email]> wrote:
> One question though, will this setting delete the inactive queues with a
> number of pending messages?
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Delete-queues-created-for-virtual-topic-consumers-tp3714004p3715969.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



--
http://fusesource.com
http://blog.garytully.com
Reply | Threaded
Open this post in threaded view
|

Re: Delete queues created for virtual topic consumers

pol_ice
I see, is there a way to unsubscribe consumer from virtual topic? So that I can ensure there are no more messages enqueued in its queue?
Reply | Threaded
Open this post in threaded view
|

Re: Delete queues created for virtual topic consumers

gtully
no, I guess the point of a virtual topic is that the messages remain,
but message expiry could be your friend here, once all messages expire
the destination will be a candidate for cleanup.

On 3 August 2011 18:50, pol_ice <[hidden email]> wrote:
> I see, is there a way to unsubscribe consumer from virtual topic? So that I
> can ensure there are no more messages enqueued in its queue?
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Delete-queues-created-for-virtual-topic-consumers-tp3714004p3716344.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



--
http://fusesource.com
http://blog.garytully.com