-
1. Re: How to disallow consuming all message in a HornetQ topic?
gaohoward Sep 18, 2014 10:51 PM (in response to hoahieusuong)1 of 1 people found this helpfulI'm thinking you can disallow such client to be created by using server side interceptors.
-
2. Re: How to disallow consuming all message in a HornetQ topic?
jbertram Sep 18, 2014 10:55 PM (in response to hoahieusuong)1 of 1 people found this helpfulI don't know of anything built in to HornetQ that would allow you to prevent a client that wasn't a selector from establishing a subscription on a topic, but you might be able to use a cleverly written remoting interceptor to implement that functionality. Check out the documentation and examples for more details on implementing a remoting interceptor. You'll probably want to intercept the org.hornetq.core.protocol.core.impl.wireformat.SessionCreateConsumerMessage message type which has "filterString" and "queueName" properties you can inspect.
-
3. Re: How to disallow consuming all message in a HornetQ topic?
hoahieusuong Sep 19, 2014 3:11 AM (in response to hoahieusuong)Thanks for quick reply!
I'll try with interceptor ^^
-
4. Re: How to disallow consuming all message in a HornetQ topic?
hoahieusuong Sep 19, 2014 6:10 AM (in response to jbertram)Justin Bertram wrote:
I don't know of anything built in to HornetQ that would allow you to prevent a client that wasn't a selector from establishing a subscription on a topic, but you might be able to use a cleverly written remoting interceptor to implement that functionality. Check out the documentation and examples for more details on implementing a remoting interceptor. You'll probably want to intercept the org.hornetq.core.protocol.core.impl.wireformat.SessionCreateConsumerMessage message type which has "filterString" and "queueName" properties you can inspect.
Hi Justin,
I tried to get the "filterString" and "queueName" from SessionCreateConsumerMessage on a jms queue, it's ok. But when I replaced a jms queue by a jms topic, the "filterString" is null. Btw, can you give me more message types for my issue (get "filterString" value of a subscription on a topic).
-
5. Re: How to disallow consuming all message in a HornetQ topic?
jbertram Sep 19, 2014 9:50 AM (in response to hoahieusuong)Try intercepting the org.hornetq.core.protocol.core.impl.wireformat.CreateQueueMessage message type. That is probably what is sent when the subscription is created.