Try PubSub+

Dealing with messages in Dead message Queue

NagaNaga Member Posts: 57

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

Answers

  • HeinzHeinz Member, Employee Posts: 7 Solace Employee

    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.

  • NagaNaga Member Posts: 57

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

  • AbhikeshAbhikesh Member Posts: 29 ✭✭
    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.

  • NagaNaga Member Posts: 57

    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 ?

  • AbhikeshAbhikesh Member Posts: 29 ✭✭

    @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.

  • NagaNaga Member Posts: 57

    @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

  • akiraltakiralt Member Posts: 2

    @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

  • AbhikeshAbhikesh Member Posts: 29 ✭✭

    @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 !

  • akiraltakiralt Member Posts: 2

    @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

  • AaronAaron Member, Moderator, Employee Posts: 279 Solace Employee

    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!

Sign In or Register to comment.