Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JMS MessageSelector

 
Christian Neudorfer
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
 
Pradeep bhatt
Ranch Hand
Posts: 8927
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: 8927
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic