How to create the dead message queue

Options
soongsauwah
soongsauwah Member Posts: 2
edited February 2021 in Tips and Tricks #1

How to create the #Dead_message_queue for the MQTT qos 1?

Comments

  • uherbst
    uherbst Member, Employee Posts: 123 Solace Employee
    Options

    Just to understand your question correctly:
    You have an MQTT QoS consumer, that consumes messages from a dynamically created queue. And the question is: How to create a Dead-Message-Queue (DMQ) for that scenario ?

    1. define a DMQ (name it as you like) (as an example: We use DMQ1 as name here)
    2. create a template queue with all parameters for the dynamically created MQTT-client-queue. One of that parameters it : Set the DMQ to the queue defined in step 1. (Just for explanation: defining a template queue is identical to defining a "normal" queue) (as an example, we use mqtt-client.template_q as name here)
    3. In the client-profile for the MQTT-client (this can even be the default-profile) define a "copy-from-template"-queue with the name of the queue created in step 2.

    If you have done all that, these things will happen when the MQTT client connects:

    • client-profile says: "Use mqtt-client.template_q as template for client-dynamic queue"
    • After creating the dynamic queue, there is a defined parameter "DMQ = DMQ1"
    • And all messages discarded to DMQ will be stored in DMQ1.

    Does that help you ? Do you need details for each step ?

  • soongsauwah
    soongsauwah Member Posts: 2
    Options

    Is the DMQ just any regular queue? If a MQTT with QOS 1 is already established , how can I associate that #mqtt{...} queue with the created DMQ?

    Thanks

  • uherbst
    uherbst Member, Employee Posts: 123 Solace Employee
    Options

    Yes, the DMQ is just a regular queue.