Solace Spring Cloud Stream and DMQ Binding

Mike13
Mike13 Member Posts: 29

Hi there
We configured an application like this:

spring:
  cloud:
    stream:
      solace:
        default:
          prefix: myapp/${application.stage}/
          consumer:
            prefix: ${spring.cloud.stream.solace.default.prefix}
            autoBindDmq: true

A DMQ is created for each of our queues, and in case of application errors, the DMQ is written to. So far so good. But I would have expected the DMQ to be visible in the queue settings.

Unfortunately this is not the case:

Is this an error in the binder?

Comments

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

    Hi @Mike13,
    The short answer is that this is expected as the Cloud Stream DMQ is actually different than an internal Solace DMQ. The longer story can be read in the Failed Message Error Handling section of the binder docs.

    -Marc

  • Mike13
    Mike13 Member Posts: 29

    Hi @marc
    Is there anything wrong if I define the DMQ created by Spring Cloud Stream as DMQ for each queue? This way TTL expirations (and others) and errors in the application would end up on the same queue (DMQ).
    Best regards
    Mike

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

    Interesting idea. I don't believe there would be an issue with that but I'll talk to a few folks and see if I'm missing anything.

  • Mike13
    Mike13 Member Posts: 29

    Hi @marc, are there any news on this question?
    Thank you, Mike

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

    Hey @Mike13,
    From a few conversations I had I don't think I'm missing anything big. If you want all your failure situations to end up on the same queue I think you're good to go. The one thing to be aware of is that messages that go to the DMQ due to max redeliveries or message expiration will no longer be DMQ eligible so you can't chain DMQs.

    A few binder configs to consider to make sure you have things configured how you want:

    • Make sure you consider the values set for queueRespectsMsgTtl, queueMaxMsgRedelivery,msgTtl and msgInternalDmqEligible
    • You could also consider using a queue template w/ a name filter so you don't have to set everything individually on each binding.
  • Mike13
    Mike13 Member Posts: 29

    Hi @marc
    Thank you!