Use this task to configure the throttling of messages for message-driven
beans that you have deployed as JCA 1.5 resources on the default messaging
provider.
Why and when to perform this task
Use this task if you want to throttle messages for a message-driven
bean deployed as a Java Connector Architecture (JCA) 1.5 resource on the default
messaging JMS provider.
The default messaging provider (the SIB JMS
Resource Adapter) uses a special type of message throttling. You should use
the throttling support described in this topic instead of the JCA 1.5 throttling
of messages described in Throttling of inbound message flow for JCA 1.5 message-driven
beans. You can leave the message-driven bean pools to the default size
of 500.
The default messaging provider enables the throttling of message
delivery to a message-driven bean through a configuration option on the JMS
activation specification used to deploy the bean. This configuration option
is labelled Maximum concurrent endpoints and can be
found on the JMS activation specification panels in the administrative console.
- The maximum number of instances of each message-driven bean is controlled
by the Maximum concurrency setting in the activation specification used to
deploy the message-driven bean. This maximum concurrency limit helps prevent
a temporary build up of messages from starting an excessive number of MDB
instances. By default, the maximum number of concurrent MDB instances is set
to 10.
The Maximum concurrent endpoints field limits the number of endpoints
(instances of a given message-driven bean) that process messages concurrently.
If the maximum has been reached, new messages are not accepted from the messaging
engine for delivery until an endpoint finishes its current processing.
If
the available message count (queue depth) associated with a message-driven
bean is frequently high, and if your server can handle more concurrent
work, you can benefit from increasing the maximum concurrency setting.
If
you set the maximum concurrency for a message-driven bean, be sure that you
specify a value smaller than the maximum number of endpoint instances that
can be created by the adapter that the message-driven bean is bound to. If
necessary, increase the endpoint instance limit.
- An activation specification also has a Maximum batch size that
refers to how many messages can be allocated to an endpoint in one batch for
serial delivery. So, for example, if you have set the Maximum concurrent
endpoints property to 10 and the Maximum batch Size property to 3, then there
can be up to 10 endpoints each processing up to 3 messages giving a total
of 30 messages allocated to that message-driven bean. If there are multiple
message-driven beans deployed against a single activation specification then
these maximum values apply to each message-driven bean individually.
- Take care to ensure that you never set the Maximum concurrent endpoints
property less than the JCA pool size.
To configure the message throttling support of the default messaging
provider (the SIB JMS Resource Adapter), use the administrative console to
complete the following steps.
- Tuning the maximum number of instances of a message-driven bean
To view or change the maximum concurrency setting (in an activation
specification), you can use the administrative console to complete the following
steps:
- In the navigation pane, click
- In the content pane, click SIB
JMS Resource Adapter
- Under Additional properties, click mdb_activation_specification
- Under Additional properties, click J2C activation
specification custom properties
- View the maxConcurrency custom property. The default is value
is 10. For high throughput primitive MDB tests, 40 was found to be an optimal
value.
- Optional: To change the maxConcurrency setting,
click the value field. This displays a panel for you to type a new value.
In the Value field, type the new value then click OK.
Finally, save your changes to the master configuration.
- Tuning the maximum batch size for a message-driven bean.
By default, only a single message is delivered to a message-driven
bean instance at one time. You can improve performance by batching messages
to the message-driven bean. Each message-driven bean instance then receives
a number (between 1 and the batch size) of messages at a time. A change in
the maximum concurrency is likely to be beneficial if the available message
count (queue depth) associated with the message-driven bean is frequently
high. (For more information about the maximum concurrency and viewing the
queue depth, see Tuning
the maximum number of instances of a message-driven bean. above.
The
maximum batch size is set in the activation specification used to deploy the
message-driven bean.
To view or change the maximum batch size setting
(in an activation specification), you can use the administrative console to
complete the following steps:
- In the navigation pane, click
- In the content pane, click SIB
JMS Resource Adapter
- Under Additional properties, click mdb_activation_specification
- Under Additional properties, click J2C activation
specification custom properties
- View the maxBatchSize custom property. The default is value
is 10. The default value is 1. For high throughput primitive MDB tests, 5
was found to be optimal value (providing a 20 per cent gain over batch size
1).
- Optional: To change the maxBatchSize setting, click
the value field. This displays a panel for you to type a new value. In the
Value field, type the new value then click OK. Finally,
save your changes to the master configuration.