This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Kubernetes in Action and have Marko Luksa on-line!
See this thread for details.
Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS MessageSelector  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
if I have a durable subscription to a topic with a specified MessageSelector. What is easiest way, if I want to change the conditions of the MessageSelector?
Do I have to unsubscribe and subscribe again with a new MessageSelector?
Best regards,
Christian
 
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

public TopicSubscriber createDurableSubscriber(Topic topic,
String name,
String messageSelector,
boolean noLocal)
throws JMSException

 
Christian Neudorfer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I know. I already have a client with a durable subscription.
What I wanted to know is, if there is a way to change the MessageSelector of a TopicSubscriber.
For example:
TopicSubscriber tSubscriber = tSess.createDurableSubscriber(topic, "Test", "version > 2", true);
What do I have to do, if I want to change to "version > 3" ???
Christian
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will have to create a new subscriber for the new message selector.
 
Christian Neudorfer
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok,
I hoped that there is another way...
Thank you for your fast reply.
Best regards,
Christian
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!