-
1. Re: Dynamic Topic Selectors
clebert.suconic Dec 11, 2012 7:21 PM (in response to mackerman)if you are using hornetq-core api, you can create a queue with a filter or not, and then having multiple consumers with different filters.
with JMS, you are currently bound to a single consumer / filter per subscription. That's a JMS limitation on the API.
-
2. Re: Dynamic Topic Selectors
mackerman Dec 12, 2012 12:23 PM (in response to clebert.suconic)thanks Clebert. It doesn't look like these core filters can be dynamically changed however, they are setup on the queue or the consumer, and once setup can't be modified. I would like to the change the filter expression frequently. Or are you suggesting I setup multiple consumers each with a different filter? That could be alot of consumers to dynamically manage.
-
3. Re: Dynamic Topic Selectors
clebert.suconic Dec 12, 2012 2:33 PM (in response to mackerman)You would need to close the consumer and reopen it.
Say...if we allowed you to close / reopen the consumer... the performance impact would be exactly the same. The implementation would have to re-scan the queues, and you would need a round trip on the network until the messages would arrive back to your client.
My suggestion would be to keep the consumer as much as open as possible until you have to change the filter...
And be careful if you're not using the message system as a database. That tends to fail usually.. if you need a lot of filtering you probably need a Cache System (Infinispan) or a Database system.