Regarding a QueueBrowser, is it possible to associate a MessageSelector to it?

Nicholas Whitehead

You create a queue browser using one of two API calls:

  1. public QueueBrowser createBrowser(Queue queue)
    This call will return a browser for all messages.
  2. public QueueBrowser createBrowser(Queue queue, java.lang.String messageSelector)
    In this call, the messageSelector parameter allows you to associate a message selector with the forthcoming browser.

However, there is no way (in the JMS spec) to associate a message selector with an existing browser.