🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

Receiving of messages on single queue with multiple consumers

Manikanta532
Manikanta532 Member Posts: 19 ✭✭
edited February 2022 in PubSub+ Event Broker #1

Hi
we have a project which is using solace queue and has 3 consumers after it was deployed.
If the messages comes on that queue expected order of receiving is
Message1--Q1
Message2--Q2
Message3--Q3

If lets say the Message1 is not acknowleded, how the messages are processed, does the message 2 goes to Q2 or Q1.
we observed behavior of it going to Q1.Is that correct, any insights on this will be helpful.

Answers

  • Neha
    Neha Member, Employee Posts: 5 Solace Employee

    Hi,
    So what I understand from your question, there is a single Queue and three consumers are bound to it.
    The message delivery behavior will depend on whether the Queue Access Type is exclusive or non-exclusive (Please see this link for the details: https://solace.com/blog/solace-message-queue-access-types/).

    So if the access type is Exclusive, the message will always go to a single consumer. Other consumers will be in Standby mode and will get the message only if the active consumer is not available.
    If the Access type is non-exclusive, messages will be delivered to all consumer in round-robin manner.

    Hope this clarifies your doubt.

    Thanks
    Neha

  • Manikanta532
    Manikanta532 Member Posts: 19 ✭✭

    Hi Neha,
    Yes, you are right.we are having non-exclusive queues, but still if first message is not acknowledged , still the next coming messages should be received in round robin fashion right ?

  • swenhelge
    swenhelge Member, Employee Posts: 80 Solace Employee

    Hi,
    you may find this blog helpful ... https://solace.com/blog/solace-message-queue-access-types/
    If your queue is using "exclusive" access mode messages will not be round robin'd amongst consumers in any case except for the original exclusive consumer disappearing/disconnecting.

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 963 admin

    @Manikanta532 said:
    Hi Neha,
    Yes, you are right.we are having non-exclusive queues, but still if first message is not acknowledged , still the next coming messages should be received in round robin fashion right ?

    Hi @Manikanta532,
    Yes you are correct. If Consumer 1 is processing Message 1 then other consumers can process messages 2,3, etc. prior to message 1 being acknowledged if you're using a non-exclusive queue.
    -Marc

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 644 admin
    edited June 2020 #6

    Hey, I talked about this question and answers on my weekly Tuesday office hours. Check it out... (skip to 8m48s)

    https://www.youtube.com/watch?v=d6vHFle74g0&t=528s