Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
2.10. Message Prefetch Behavior
Overview Link kopierenLink in die Zwischenablage kopiert!
Figure 2.3. Consumer Prefetch Limit
Consumer specific prefetch limits Link kopierenLink in die Zwischenablage kopiert!
Consumer Type | Property | Default |
---|---|---|
Queue consumer | queuePrefetch | 1000 |
Queue browser | queueBrowserPrefetch | 500 |
Topic consumer | topicPrefetch | 32766 |
Durable topic subscriber | durableTopicPrefetch | 100 |
Setting prefetch limits per broker Link kopierenLink in die Zwischenablage kopiert!
destinationPolicy
element as a child of the broker
element in the broker's configuration, as shown in Example 2.13, “Configuring a Destination Policy”.
Example 2.13. Configuring a Destination Policy
queue.
is set to 1 (the >
character is a wildcard symbol that matches one or more name segments); and the topic prefetch limit for all topics whose names start with topic.
is set to 1000.
Setting prefetch limits per connection Link kopierenLink in die Zwischenablage kopiert!
ActiveMQConnectionFactory
instance. Example 2.14, “Setting Prefetch Limit Properties Per Connection” shows how to specify the prefetch limits for all consumer types on a connection factory.
Example 2.14. Setting Prefetch Limit Properties Per Connection
Setting prefetch limits per destination Link kopierenLink in die Zwischenablage kopiert!
TEST.QUEUE
with a prefetch limit of 10. The option is set as a destination option as part of the URI used to create the queue.
Example 2.15. Setting the Prefetch Limit on a Destination
Queue queue = new ActiveMQQueue("TEST.QUEUE?consumer.prefetchSize=10"); MessageConsumer consumer = session.createConsumer(queue);
Queue queue = new ActiveMQQueue("TEST.QUEUE?consumer.prefetchSize=10");
MessageConsumer consumer = session.createConsumer(queue);
Disabling the prefetch extension logic Link kopierenLink in die Zwischenablage kopiert!
Example 2.16. Disabling the Prefetch Extension