immutant.messaging.hornetq documentation

HornetQ specific messaging functionality.


(destination-controller name)(destination-controller name control-type)
Returns the destination controller for the given name, or nil if
the destination doesn't exist. name can either be a String or the
result of calling messaging/as-queue or messaging/as-topic.

The returned controller depends on the type of the given
destination and, for queues, the requested control-type (which
defaults to :jms):

destination  control-type  controller
Queue        :jms
Queue        :core
Topic        <ignored>

Refer to the javadocs for those control classes for details on the
available operations.


(set-address-options match settings)
Sets the HornetQ-specific address options for the given match.
This provides programatic access to options that are normally set
in the xml configuration.  match must be contain either 'queue' or
'topic', be the result of calling as-queue or as-topic, or a fully
qualified jms destination name (prefixed with jms.queue. or
jms.topic.). It may contain HornetQ wildcard matchers (see

The following settings are supported [default value]:

* :address-full-message-policy [:page] - Specifies what should
  happen when an address reaches :max-size-bytes in undelivered
  messages. Options are:
   * :block - publish calls will block until the current size
     drops below :max-size-bytes
   * :drop - new messages are silently dropped
   * :fail - new messages are dropped and an exception is thrown on publish
   * :page - new messages will be paged to disk

* :dead-letter-address [jms.queue.DLQ] - If set, any messages that
  fail to deliver to their original destination will be delivered
  here. See

* :expiry-address [jms.queue.ExpiryQueue] - If set, any messages
  with a :ttl that expires before delivery will be delivered
  here. See

* :expiry-delay [-1] - If > -1, this value (in ms) is used as the
  default :ttl for messages that don't have a :ttl > 0 set. 

* :last-value-queue [false] - If true, only the most recent message
   for a last-value property will be retained. Setting this option will
   also cause :address-full-message-policy to be set to :drop, as HornetQ
   has a bug related to paging last value queues. See

* :max-delivery-attempts [10] - The number of times delivery will
  be attempted for a message before giving up. If :dead-letter-address
  is set, the message will be delivered there, or removed otherwise. See

* :max-redelivery-delay [:redelivery-delay] - Specifies the maximum
  redelivery delay (in ms) when a :redelivery-multiplier is used. 

* :max-size-bytes [20971520 (20MB)] - The maximum size (in bytes) of retained messages
  on an address before :address-full-message-policy is applied. See

* :page-cache-max-size [5] - HornetQ will keep up to this many page files in
  memory to optimize IO. See

* :page-size-bytes [10485760 (10MB)] - The size (in bytes) of the page files created
  when paging. See

* :redelivery-delay [0] - Specifies the delay (in ms) between
  redelivery attempts. See

* :redelivery-multiplier [1.0] - Controls the backoff for redeliveries. The
  delay between redelivery attempts is calculated as
  :redelivery-delay * (:redelivery-multiplier ^ attempt-count). This won't have
  any effect if you don't also set :redelivery-delay and :max-redelivery-delay.

* :redistribution-delay [1000] - Specifies the delay (in ms) to wait before
  redistributing messages from a node in a cluster to other nodes when the
  queue no longer has consumers on the current node. See

* :send-to-dla-on-no-route [false] - If true, any message that can't be
  routed to its destination will be sent to :dead-letter-address. 

Calling this function again with the same match will override
replace any previous settings for that match.