You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Llama007 <ti...@planetgates.com> on 2015/02/12 21:26:11 UTC

Virtual Destination selector with unwanted messages

Hello 
We have a situation we are using a Virtual Destination with a message
selector.  The virtual destination is NOT selectorAware because we want to
get messages when there are no consumers on the queue.  This has the effect
of forwarding every message sent to the Virtual Topic to the destination
queue regardless of if it matches the message selector or not.  This means
messages that will never be subscribed by the message selector will
eventually fill up the queue.  
Is there any way to clean up those 'unselected' messages short of creating
another consumer with a message selector that negates the original message
selector?

We are using ActiveMQ 5.10

Thanks
Tim



--
View this message in context: http://activemq.2283324.n4.nabble.com/Virtual-Destination-selector-with-unwanted-messages-tp4691474.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Virtual Destination selector with unwanted messages

Posted by artnaseef <ar...@artnaseef.com>.
Message TTLs could do the trick.

Message selectors are a cool feature on the surface, but are full of issues
in reality.  With Topic subscriptions, they are relatively safe, although
they can be expensive.  With Queues they often lead to major issues.  Please
use with caution.

There are typically alternatives to achieve the same end.  Such as using
camel routes to filter from one destination to another more intelligently
based on the application's needs.



--
View this message in context: http://activemq.2283324.n4.nabble.com/Virtual-Destination-selector-with-unwanted-messages-tp4691474p4691559.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Virtual Destination selector with unwanted messages

Posted by Gary Tully <ga...@gmail.com>.
peek at http://activemq.apache.org/maven/apidocs/org/apache/activemq/plugin/SubQueueSelectorCacheBroker.html

the idea is that a plugin will retain the info about consumers
selectors so even if they disconnect for a while, the virtual topic
will retain or dispatch messages for it. This allows you to keep the
selectorAware option.

On 12 February 2015 at 20:26, Llama007 <ti...@planetgates.com> wrote:
> Hello
> We have a situation we are using a Virtual Destination with a message
> selector.  The virtual destination is NOT selectorAware because we want to
> get messages when there are no consumers on the queue.  This has the effect
> of forwarding every message sent to the Virtual Topic to the destination
> queue regardless of if it matches the message selector or not.  This means
> messages that will never be subscribed by the message selector will
> eventually fill up the queue.
> Is there any way to clean up those 'unselected' messages short of creating
> another consumer with a message selector that negates the original message
> selector?
>
> We are using ActiveMQ 5.10
>
> Thanks
> Tim
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Virtual-Destination-selector-with-unwanted-messages-tp4691474.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.