1

I have two components communicating over an jms queue in a wildfly instance. As soon as the consumer of the queue disconnects or gets stopped, the messages are forwarded to the DLQ (at least when wildfly is restarted).

Is it possible to configure wildfly to automatically redeliver the messages from DLQ as soon as a consumer reconnects to the queue?

Some details

  • Wildfly version: 8.2.0

  • standalone.xml - As far as I can tell, nothing special


        <jms-destinations>
            <jms-queue name="ExpiryQueue">
                <entry name="java:/jms/queue/ExpiryQueue"/>
                <durable>false</durable>
            </jms-queue>
            <jms-queue name="DLQ">
                <entry name="java:/jms/queue/DLQ"/>
                <durable>false</durable>
            </jms-queue>
                            ...
            <jms-queue name="Q1-Producer-to-Consumer">
                <entry name="java:/queue/Q1-Producer-to-Consumer"/>
                <entry name="java:jboss/exported/queue/Q1-Producer-to-Consumer"/>
                <durable>false</durable>
            </jms-queue>

    </jms-destinations>

Thanks.

Rob
  • 14,746
  • 28
  • 47
  • 65
eks
  • 501
  • 4
  • 13
  • If you have a RedHat account, check [this article](https://access.redhat.com/solutions/3509091) out. The gist of it is if your DLQ only contains messages from a single queue you can use the `move-messages` CLI operation on that queue, otherwise you need to code a consumer/producer that will read the messages, extract their origin from a message property (possibly "_AMQ_ORIG_QUEUE") and write them back on the queue in question. – Aaron Dec 04 '19 at 15:17

1 Answers1

0

The DLQ only gets messages that have thrown an exception during message processing. If a consumer disconnects, the messages will just still be sitting there awaiting delivery

If you are seeing an Issue whereby during a server restart messages hit the DLQ, this would suggest that your consumer is consuming messages before the resources it requires are available, so is erroring when processing the messages. You would be better to fix your consumer to not start consuming messages to early, rather than trying to fish the failed messages back from DLQ

Will Tatam
  • 566
  • 3
  • 10