Dealing with messages in Dead message Queue

Naga
Naga Member Posts: 58

Hi Team,
How to process the messages in Dead msg queue and how long messages remain on solace queue?

Answers

  • The messages stay in the original queue until the TTL for the message (or the queue) expires. The message must also have been published with "DMQ Eligible" flag set and "Respect TTL" must be set on the queue. When the TTL expires on the message it is moved from the original queue into the queue that was configured as the DMQ for the original queue (either a specific queue or the generic default system DMQ).

    Once the message is moved from the original queue into the DMQ, the DMQ Eligible flag is removed from the message, so it will sit in the DMQ until it is processed or deleted. To process messages from the DMQ is the exact same process you would use to process messages from any other Solace Queue.

  • Naga
    Naga Member Posts: 58

    Thanks Heinz.
    If I want to move the messages from Dead message queue to original solace queue what is the process ?

  • Abhikesh
    Abhikesh Member Posts: 34 ✭✭
    edited November 2019 #4

    @Naga You Can Set TTL value on your Dead message queue and map the original solace queue and once TTL time expired message will move to original solace queue.
    2nd option is to use Solace HybridEdge, With help of HybridEdge you can copy messages from one Queue to another queue even from solace to other messaging products.

  • Naga
    Naga Member Posts: 58

    Thanks!
    Are there any other ways like using shell script or any other tool which can be executed manually whenever messages has to be forwarded from one queue to another ?

  • Abhikesh
    Abhikesh Member Posts: 34 ✭✭

    @Naga I think there are no readymade tool available but you can write script/code to achieve the same or if there are requirement to copy messgaes from one solace queue to another solace queue, you can try Solace Hybrid Edge, This utility is based on Apache Camel.

  • Naga
    Naga Member Posts: 58

    @Abhikesh Yes I am trying to use solace sample codes to achieve this. But facing issues with gradle.
    Hybrid edge- Let me try this as well

  • akiralt
    akiralt Member Posts: 5 ✭✭

    @Abhikesh

    Hello about this 1st option setting up a TTL on DMQ queue pointing to the primary. Not sure if I'm configuring correctly, but when messages are sent from primary queue to DMQ, it looses the DMQ-Eligible flag, and because of that is not send back to main queue.

    I set on DMQ, Respect TTL and Max TTL.
    Primary to DMQ - OK
    DMQ to Primary - NOK

  • Abhikesh
    Abhikesh Member Posts: 34 ✭✭

    @akiralt You are right, Message will not move from DMQ to Primary since it already loss DMQ-Eligible flag !
    What is your use-case ? Can't you consume from DMQ itself !

  • akiralt
    akiralt Member Posts: 5 ✭✭

    @Abhikesh said:
    @akiralt You are right, Message will not move from DMQ to Primary since it already loss DMQ-Eligible flag !
    What is your use-case ? Can't you consume from DMQ itself !

    Hello

    The application will read/process the messages from the main queue "A", then filter/select them (they have some parameters setup on their side) and then put the unnecessary back messages back to a backout queue (this will be setup to have a DMQ using the main queue "A" as DMQ). Then they will keep doing that with the messages till they need those specific messages.

    Thanks again for your feedback.

    Regards

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 636 admin

    Hi @akiralt ... yeah, as mentioned previously, there is currently no way to move messages from one queue to another with tooling inside the broker. This may change in future releases. Other customers of our have used JMS Toolbox, but it is a client-side tool, not the broker.

    But I'm wondering if your intended flow could be improved somehow... you app pulls ALL messages of queue A, then "puts the unnecessary messages back" to a different queue B (i.e. your app republishes new messages with the original content?), and then queue B has queue A as a DMQ, and eventually the messages to back to the same app..? Is that right? If your app doesn't republish, then how does your app "put the unnecessary messages back"?

    Thanks!