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 8694105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:42:22+00:00 2026-06-13T00:42:22+00:00

My question is about one to many message flow using a single queue in

  • 0

My question is about one to many message flow using a single queue in IBM MQ. I am new to MQ.

Scenario – Suppose there are multiple processes reading from a single queue, when they read a message from the queue , do all of them get the same message.

ie – Lets say there are no messages on the queues and two readers are blocked on it (executed the MQGET on it).

  1. 1 messages come on the queue (logically meant for process 1). Will both of them get the message as both were waiting (executed the MQGET on it) or only to one process randomly.

  2. once the message is read is it removed from the queue.

  3. If messages are removed from queue after reading ,suppose process 1 is processing and a new message comes for it and instead process 2 gets it and is deleted. When process 1 tries to get it wont get any message. Is this possible.

basically i want to know how to manage multiple processes on a single queue so that the messages go to right process and no message is missed.

  • 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-13T00:42:23+00:00Added an answer on June 13, 2026 at 12:42 am

    Multiple apps reading on a queue compete for messages if no selectors are used. Straight FIFO reads deliver messages to competing apps such that any one message is delivered once to one of the app instances. Assuming the app gets the message outside of syncpoint or issues a COMMIT then no other app will see the message and it will be permanently removed.

    Things that change the behavior include:

    • Message selectors. If the apps get messages by MsgID or other selection criteria the QMgr makes only messages that meet the selection available to the app. If multiple app instances use the same selection criteria, they compete for messages within the subset defined by the selector.
    • Rollbacks. If an app rolls back a message it becomes available again and may go to the same or different application instance.
    • Priority delivery. Behaves as for FIFO except that messages are ordered by priority with the highest priority ones being delivered first.
    • Message groups. It is possible to select messages by group ID and to specify that the GET does not succeed until all messages in the group are present. If a partial group lands on the queue it is possible to see depth on the queue but no messages delivered to the application.

    Looking at your questions one at a time:

    1. messages come on the queue (logically meant for process 1). Will both of them get the message as both were waiting (executed the MQGET on it) or only to one process randomly.
      Queues are cheap. Don’t put messages destined for App1 and App2 on the same queue if the apps are reading FIFO. The only way to share a queue across different apps (or different instances of the same app) is if all things reading from the queue use selectors and that the selectors effectively segregate the messages so they go to the right app. If even one instance is running FIFO then it doesn’t work.

    2. once the message is read is it removed from the queue.
      Yes, provided the app issues a GET followed by COMMIT or a GET outside of syncpoint. If the app browses the queue, then the message remains and becomes available to other apps once the browse cursor moves off of it.

    3. If messages are removed from queue after reading ,suppose process 1 is processing and a new message comes for it and instead process 2 gets it and is deleted. When process 1 tries to get it wont get any message. Is this possible.
      Absolutely. As noted earlier, apps or app instances reading the queue in a FIFO mode will compete for messages. If indeed a message arrives “for process 1” then either use selectors that prevent other processes from reading the message or use different queues for each instance.

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

Sidebar

Related Questions

I have a question about One-To-Many relationship between two tables when there is the
I have a question about Criteria method, one-to-many relation to the database, 'one' is
i have one question about jquery ajax().. I created a table grid and there
now I am working with python. So one question about dict .... suppose I
I read many question about that and tutorials, but the only one executed, and
This is probably a long shot but I asked a question about converting one
one question about PHP Development. I am building up some Form Fields for Calculations.
One question about protected constructor. I learnt that the protected constructor can be used
I have one question about searching and counting files in directories and subdirectories. I
I have one question about Yii framework, and I need your help. Basicly, I

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.