5.7.3. Configuring Topics
5.7.3.1. Topic Managed Bean Attributes
- Name
- Defines the name of the topic.
- JNDIName
- Defines the JNDI location where the topic is bound.
- DLQ
- Defines the Dead Letter Queue (DLQ) used for this topic and overrides any value set in the Server Peer configuration file.
- ExpiryQueue
- Defines the expiry queue used for this topic and overrides any value set in the Server Peer configuration file.
- RedeliveryDelay
- Defines the delay period between redelivery attempts for this topic and overrides any value set in the Server Peer configuration file.
- MaxDeliveryAttempts
- Defines the maximum number of times message delivery will be attempted before the message is sent to the DLQ, if configured. The default value is
-1
, which specifies that the value from the Server Peer configuration file be used. Any other setting overrides the Server Peer value. - CreatedProgrammatically
- Returns
true
if the topic was created programmatically. - MaxSize
- Specifies the maximum number of messages that can be held in a topic subscription. Any excess messages will be dropped from the topic. The default value is
-1
, which applies no size restriction. - Clustered
- Set this to
true
if your destination is clustered. - MessageCounterHistoryDayLimit
- Defines the maximum number of days to retain message counter history, and overrides any value set in the Server Peer configuration file.
- MessageCounters
- Returns a list of message counters for the topic's subscriptions.
- AllMessageCount
- Returns the total number of messages in all subscriptions belonging to the topic.
- DurableMessageCount
- Returns the total number of durable messages in all subscriptions belonging to this topic.
- NonDurableMessageCount
- Returns the total number of non-durable messages in all subscriptions belonging to this topic.
- DropOldMessageOnRedeploy
- Specifies how queue services with clustered attributes that differ from previously deployed attributes are handled. If set to
true
, all remaining messages in the queue are deleted after the queue service re-deployment if the queue service attribute contains a different clustered attribute. If set tofalse
(default), all messages are reserved.Warning
When you re-deploy a destination, you must shut down all the nodes in the cluster, make proper configuration changes, and then restart the nodes.Redeploying from a non-clustered to a clustered queue requires you set the clustered attribute totrue
, and add the queue service configuration to each node.Redeploying from a clustered to a non-clustered queue requires you set the clustered attribute tofalse
in one of the queue configurations and delete all other queues in the cluster. - AllSubscriptionsCount
- Returns a count of all subscriptions belonging to this topic.
- DurableSubscriptionsCount
- Returns a count of all durable subscriptions belonging to this topic.
- NonDurableSubscriptionsCount
- Returns a count of all non-durable subscriptions belonging to this topic.
5.7.3.1.1. Destination Security Configuration
<SecurityConfig> determines which roles can read, write and create upon the destination. It uses the same syntax and semantics as JBossMQ destination security configuration.
The <SecurityConfig> element must contain one <security> element, which can contain multiple <role> elements. A <role> element defines the access type for that particular role using the following attributes:
- read
- Specifies the role can create consumers, receive messages, and browse the destination.
- write
- Specifies the role can create producers, or send messages to the destination.
- create
- Specifies the role can create durable subscriptions on this destination.
Note
Configuring security for a destination is optional. If a
SecurityConfig
element is not specified, then the default security configuration from the Server Peer will be used instead.
5.7.3.1.2. Destination paging parameters
Previously, for an application to support a queue or subscription, the queue needed to be stored entirely in memory. This was not always possible for very large queues or subscriptions.
Pageable Channels is a new JBoss Messaging feature that lets you specify a maximum number of messages to be stored in memory at one time, on a queue-by-queue or topic-by-topic basis. JBoss Messaging then pages messages to and from storage transparently in blocks. This allows queues and subscriptions to grow to very large sizes without any degradation in performance as channel size increases. It has been tested with queues in excess of ten million 2 kilobyte messages on very basic hardware, and has the potential to scale to much greater message numbers.
The individual parameters associated with pageable channels are as follows:
- FullSize
- Specifies the maximum number of messages held by the queue or topic subscription in memory at any one time. The actual queue can hold more messages, but these are paged to and from storage as messages are added or consumed. If no value is specified, the default is
75000
. - PageSize
- Specifies the maximum number of messages that are pre-loaded per operation when loading messages from the queue or subscription. If no value is specified, the default is
2000
. - DownCacheSize
- Specifies the maximum number of messages the Down Cache holds before the messages are flushed to storage. The default value is
2000
messages.When messages are paged to storage from the queue, they enter a Down Cache before being written to storage. This enables the write to occur as a single operation, which aids performance.Note
Paging parameters for temporary queues must be specified on the appropriate connection factory. See the section on Connection Factory Configuration for details.