2 Replies Latest reply on Dec 13, 2017 11:39 AM by Med Alpa

    HornetQ : How to read DLQ details

    Med Alpa Newbie

      I would like to read the number of messages sent to the DLQ in hornetq.

      Using CLI commands, the jms.queue.DLQ does not appear after : /subsystem=messaging/hornetq-server=default/jms-queue=

      Even if it's configured as DLQ for the testQueue

      { "outcome" => "success", "result" => { "consumer-count" => 0, "dead-letter-address" => "jms.queue.DLQ", "delivering-count" => 0, "durable" => true, "entries" => [ "queue/test", "java:jboss/exported/jms/queue/test" ], "expiry-address" => "jms.queue.ExpiryQueue", "message-count" => 0L, "messages-added" => 0L, "paused" => false, "queue-address" => "jms.queue.testQueue", "scheduled-count" => 0L, "selector" => undefined, "temporary" => false } } 

      Enviroment: jboss 6.0

      Thanks.

        • 1. Re: HornetQ : How to read DLQ details
          Yong Hao Gao Master

          I think you probably didn't have the DLQ deployed. Try to add a DLQ to the

          broker.

          • 2. Re: HornetQ : How to read DLQ details
            Med Alpa Newbie

            Thank you for the reply.

             

            Which broker? How to ad this queue?

             

             

            here is the configuration of the subsystem:

            <subsystem xmlns="urn:jboss:domain:messaging:1.2">

                <hornetq-server>

                    <persistence-enabled>true</persistence-enabled>

                    <journal-file-size>102400</journal-file-size>

                    <journal-min-files>2</journal-min-files>

             

                    <connectors>

                        <netty-connector name="netty" socket-binding="messaging"/>

                        <netty-connector name="netty-throughput" socket-binding="messaging-throughput">

                            <param key="batch-delay" value="50"/>

                        </netty-connector>

                        <in-vm-connector name="in-vm" server-id="0"/>

                    </connectors>

             

                    <acceptors>

                        <netty-acceptor name="netty" socket-binding="messaging"/>

                        <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                            <param key="batch-delay" value="50"/>

                            <param key="direct-deliver" value="false"/>

                        </netty-acceptor>

                        <in-vm-acceptor name="in-vm" server-id="0"/>

                    </acceptors>

             

                    <security-settings>

                        <security-setting match="#">

                            <permission roles="guest" type="send"/>

                            <permission roles="guest" type="consume"/>

                            <permission roles="guest" type="createNonDurableQueue"/>

                            <permission roles="guest" type="deleteNonDurableQueue"/>

                        </security-setting>

                    </security-settings>

             

                    <address-settings>

                        <address-setting match="#">

                            <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                            <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                            <redelivery-delay>0</redelivery-delay>

                            <max-size-bytes>10485760</max-size-bytes>

                            <address-full-policy>BLOCK</address-full-policy>

                            <message-counter-history-day-limit>10</message-counter-history-day-limit>

                        </address-setting>

                    </address-settings>

             

                    <jms-connection-factories>

                        <connection-factory name="InVmConnectionFactory">

                            <connectors>

                                <connector-ref connector-name="in-vm"/>

                            </connectors>

                            <entries>

                                <entry name="java:/ConnectionFactory"/>

                            </entries>

                        </connection-factory>

                        <connection-factory name="RemoteConnectionFactory">

                            <connectors>

                                <connector-ref connector-name="netty"/>

                            </connectors>

                            <entries>

                                <entry name="RemoteConnectionFactory"/>

                                <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>

                            </entries>

                        </connection-factory>

                        <connection-factory name="ApplicationsQueueConnectionFactory">

                            <connectors>

                                <connector-ref connector-name="in-vm"/>

                            </connectors>

                            <entries>

                                <entry name="/ApplicationsQueueConnectionFactory"/>

                            </entries>

                        </connection-factory>

                        <pooled-connection-factory name="hornetq-ra">

                            <transaction mode="xa"/>

                            <connectors>

                                <connector-ref connector-name="in-vm"/>

                            </connectors>

                            <entries>

                                <entry name="java:/JmsXA"/>

                            </entries>

                        </pooled-connection-factory>

                    </jms-connection-factories>

             

                    <jms-destinations>

                        <jms-queue name="testQueue">

                            <entry name="queue/test"/>

                            <entry name="java:jboss/exported/jms/queue/test"/>

                        </jms-queue>

                    </jms-destinations>

                </hornetq-server>

            </subsystem>