7.2. Configuring the Type of Cursor Used by a Destination
Overview
destinationPolicy element. The destinationPolicy element is a wrapper for a policyMap element. The policyMap element is a wrapper for a policyEntries element. The policyEntries element is a wrapper for one or more policyEntry elements.
policyEntry element. The configuration elements used to specify the type of destination you are configuring. Topics use cursors for both durable subscribers and transient subscribers, so it uses two sets of configuration elements. Queues only a single cursor and only require a single set of configuration elements.
Configuring topics
PendingDurableSubscriberMessageStoragePolicy child element to the topic's policyEntry element. Table 7.1, “Elements for Configuring the Type of Cursor to Use for Durable Subscribers” describes the possible children of PendingDurableSubscriberMessageStoragePolicy.
Table 7.1. Elements for Configuring the Type of Cursor to Use for Durable Subscribers
| Element | Description |
|---|---|
storeDurableSubscriberCursor | Specifies that store-based cursors will be used. See the section called “Store-based cursors” for more information. |
vmDurableCursor | Specifies that VM cursors will be used. See the section called “VM cursors” for more information. |
fileDurableSubscriberCursor | Specifies that file-based cursors will be used—only suitable for non-persistent messages. See the section called “File-based cursors” for more information. |
pendingSubscriberPolicy child element to the topic's policyEntry element. Table 7.2, “Elements for Configuring the Type of Cursor to Use for Transient Subscribers” describes the possible children of pendingSubscriberPolicy.
Table 7.2. Elements for Configuring the Type of Cursor to Use for Transient Subscribers
| Element | Description |
|---|---|
| Unspecified | Default policy is to use store-based cursors. See the section called “Store-based cursors” for more information. |
vmCursor | Specifies the VM cursors will be used. See the section called “VM cursors” for more information. |
fileCursor | Specifies that file-based cursors will be used. See the section called “File-based cursors” for more information. |
Example 7.1. Configuring a Topic's Cursor Usage
<beans ... >
<broker ... >
...
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic="com.fusesource.>" >
...
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
<pendingDurableSubscriberPolicy>
<storeDurableSubscriberCursor />
</pendingDurableSubscriberPolicy>
...
</policyEntry>
...
</policyEntries>
</policyMap>
</destinationPolicy>
...
</broker>
...
</beans>Configuring queues
pendingQueuePolicy element to the queue's policyEntry element. Table 7.3, “Elements for Configuring the Type of Cursor to Use for a Queue” describes the possible children elements of the pendingQueuePolicy element.
Table 7.3. Elements for Configuring the Type of Cursor to Use for a Queue
| Element | Description |
|---|---|
storeCursor | Specifies that store-based cursors will be used. See the section called “Store-based cursors” for more information. |
vmQueueCursor | Specifies the VM cursors will be used. See the section called “VM cursors” for more information. |
fileQueueCursor | Specifies that file-based cursors will be used. See the section called “File-based cursors” for more information. |
Example 7.2. Configuring a Queue's Cursor Usage
<beans ... >
<broker ... >
...
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue="com.fusesource.>" >
...
<pendingQueuePolicy>
<vmQueueCursor />
</pendingQueuePolicy>
...
</policyEntry>
...
</policyEntries>
</policyMap>
</destinationPolicy>
...
</broker>
...
</beans>
Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.