2 Replies Latest reply on Aug 5, 2013 4:01 AM by Andy Taylor

    How to set Queue/Address Attributes using JMS Management API?

    Paul Manning Newbie

      Typically when I create a queue with configuration, I setup address-settings such as:



      {code:xml}<address-setting match="jms.queue.MyQueue">





      I have a case where I am dynamically creating a queue using HornetQ's JMS Management API. How can I set these.


      I took a look at the JMSQueueControl in the HornetQ JMS Management doc:




      There it defines methods to update the "durable" attribute and DLQ, but that is it.


      The AddressControl only allows you to add Roles.


      Any help is appreciated. Thanks,



      Paul Manning

        • 1. Re: How to set Queue/Address Attributes using JMS Management API?
          Paul Manning Newbie

          I am still interested in a solution to this, however, I think I have found a work around.


          I can setup a default catch all configuration in the HornetQ.sar's hornetq-configuration.xml file like so...




                <!--default for all queues with the following prefix-->

                <address-setting match="MyDynamicQueuePrefix.#">










          1 of 1 people found this helpful
          • 2. Re: How to set Queue/Address Attributes using JMS Management API?
            Andy Taylor Master

            sorry for the slow reply, been on vacation, anyway




            @Operation(desc= "Add address settings for addresses matching the addressMatch", impact = MBeanOperationInfo.ACTION)

               void addAddressSettings(@Parameter(desc="an address match", name="addressMatch") String addressMatch,

                                       @Parameter(desc="the dead letter address setting", name="DLA") String DLA,

                                       @Parameter(desc="the expiry address setting", name="expiryAddress") String expiryAddress,

                                       @Parameter(desc="the expiry delay setting", name="expiryDelay") long expiryDelay,

                                       @Parameter(desc="are any queues created for this address a last value queue", name="lastValueQueue") boolean lastValueQueue,

                                       @Parameter(desc="the delivery attempts", name="deliveryAttempts") int deliveryAttempts,

                                       @Parameter(desc="the max size in bytes", name="maxSizeBytes") long maxSizeBytes,

                                       @Parameter(desc="the page size in bytes", name="pageSizeBytes") int pageSizeBytes,

                                       @Parameter(desc="the max number of pages in the soft memory cache", name="pageMaxCacheSize") int pageMaxCacheSize,

                                       @Parameter(desc="the redelivery delay", name="redeliveryDelay") long redeliveryDelay,

                                       @Parameter(desc="the redelivery delay multiplier", name="redeliveryMultiplier") double redeliveryMultiplier,

                                       @Parameter(desc="the maximum redelivery delay", name="maxRedeliveryDelay") long maxRedeliveryDelay,

                                       @Parameter(desc="the redistribution delay", name="redistributionDelay") long redistributionDelay,

                                       @Parameter(desc="do we send to the DLA when there is no where to route the message", name="sendToDLAOnNoRoute") boolean sendToDLAOnNoRoute,

                                       @Parameter(desc="the ploicy to use when the address is full", name="addressFullMessagePolicy") String addressFullMessagePolicy) throws Exception;