Reprocessing the messages without using DMQ

Hi Team,

I am using SAP CPI with Solace Advanced Event Mesh.
I created a queue and enabled DMQ and Replay.

When I replay messages from DMQ, I see:

  • DMQ message count increases
  • Default replay log also increases

Why are both increasing?
Should replay move messages back to original queue automatically?

Thanks in advance.

Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:

Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.

AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a :+1:. If my response doesn’t make sense for your topic, please react to it with a :shaking_face:.

Based on the provided documentation, I can explain why both DMQ message count and replay log increase when replaying messages from DMQ, and clarify the behavior of message replay.

Reasoning:

  1. When messages are replayed from a DMQ, they are treated as new messages being published to the target queue. The replay log captures all Guaranteed messages by default, so these replayed messages are also added to the replay log.

  2. If these replayed messages fail delivery again (e.g., due to the same issue that caused them to go to DMQ initially), they will be moved to the DMQ again because:

    • Messages in DMQ retain their original headers and properties
    • The DMQ eligibility and delivery failure conditions still apply
    • There is no automatic mechanism to prevent messages from going back to DMQ
  3. Message replay does not automatically move messages back to the original queue - it’s simply a mechanism to resend messages from a replay log to a specified endpoint. The replay feature:

    • Delivers messages from the replay log to specified endpoints
    • Maintains original message order and properties
    • Does not modify or remove messages from their source location

Answer:
The behavior you’re observing is expected. Message replay is not designed to automatically move messages from DMQ back to original queues - it’s a mechanism for replaying historical messages from the replay log. When replaying from DMQ:

  1. Messages are treated as new publications to the target queue
  2. These messages are captured in the replay log (increasing replay log count)
  3. If delivery fails again, messages return to DMQ (increasing DMQ count)

To properly handle DMQ messages, consider:

  • Addressing the root cause of message delivery failures before replay
  • Using a separate application to process DMQ messages
  • Implementing proper error handling and retry logic in the consuming application

Sources: