Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8858455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:49:59+00:00 2026-06-14T14:49:59+00:00

What is the algorithmic time complexity of applying JMS selectors when consuming messages from

  • 0

What is the algorithmic time complexity of applying JMS selectors when consuming messages from a queue, with respect to queue depth n? In particular, is it linear (O(n)) per read? Is it implementation-dependent (on the JMS provider), and does it depend on what fields are being requested?

(if implementation dependent, I’m particularly interested in Websphere MQ and Solace’s behaviour, but I welcome answers that deal with any particular JMS provider, especially if you have links to documentation describing the complexity!).

Motivation: each message has two properties: an invocationID and a batchName. A batch consists of several invocations. Clients wish to consume messages in one of two ways; either by invocationID or by batchName. At the point that messages are produced, I don’t know by which method they will be consumed. 

This can be implemented through selectors:

invocationID=42

Or

batchName="reconciliation"

…and I can speed one of these up by using the correlation ID instead of a custom property, but am concerned that the other will remain slow.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:50:00+00:00Added an answer on June 14, 2026 at 2:50 pm

    According to the docs, the messages are searched sequentially. WMQ does however index the MessageID and CorrelID fields. The Infocenter describes the behavior as follows:

    Selecting messages from a queue requires WebSphere MQ to sequentially
    inspect each message on the queue. Messages are inspected until a
    message is found that matches the selection criteria or there are no
    more messages to examine. Therefore, messaging performance suffers if
    message selection is used on deep queues.

    To optimize message selection on deep queues when selection is based
    on JMSCorrelationID or JMSMessageID, use a selection string of the
    form JMSCorrelationID = … or JMSMessageID = … and reference only
    one property.

    This method offers a significant improvement in performance for
    selection on JMSCorrelationID and offers a marginal performance
    improvement for JMSMessageID.

    I would love to understand more about the requirement to multiplex queues. A complex selector is going to impact performance on anyone’s implementation and the alternative of using multiple open handles with simpler selectors is no different to the app code than using multiple queues. For WMQ of course, dynamic queues or many permanently defined queues is no problem at all. Very often when I see this requirement, it comes from shops that have used certain other transports where performance takes a severe dive with many queues defined and there is an assumption that this is true on WMQ as well. In other cases the requirement has been met with Pub/Sub and durable subscriptions. I’m not suggesting there are no valid cases for this requirement, just wondering what is driving it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Quoted from wikipedia, the P vs NP problem, regarding the time complexity of algorithms
Pardon me if the question is silly. I am new to algorithmic time complexity.
Hi All I need some direction with respect to calculating time complexity of a
Could you please help me find out the time complexity of the Fleury' algorithm
Give a linear-time algorithm to test whether a tree has a perfect matching, that
Assuming some algorithm has a polynomial time complexity T(n) , is it possible for
How can I calculate the time complexity of a recursive algorithm? int pow1(int x,int
What is the time complexity of the following implemented algorithm? I should notice that
I understand how to find the time complexity of an algorithm when I've been
Related question: Time Complexity of InOrder Tree Traversal of Binary Tree O(N)? , however

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.