Throttling inbound message flow for JCA 1.5 message-driven beans
This topic describes how to throttle message delivery for message-driven beans (MDB) which are deployed as message endpoints for JEE Connector Architecture (JCA) Version 1.5 inbound resource adapters.
The throttling of messages as described in this topic does not apply to the two JCA 1.5-compliant messaging providers that are supplied with WebSphere Application Server:
- The default messaging provider.
- The WebSphere MQ messaging provider.
For the default messaging provider, you configure message throttling as described in the related tasks. For the WebSphere MQ messaging provider, you configure message throttling by setting the maximum server sessions property on the WebSphere MQ messaging provider activation specifications panel, or the maxPoolSize property when using the createWMQActivationSpec or modifyWMQActivationSpec wsadmin commands.
If we have a third-party JCA 1.5-compliant JMS messaging provider, check with the supplier to see whether the method of message throttling described in this topic is appropriate for their messaging provider.
For installations that use resource adapters that implement the Java EE Connector Architecture (JCA) Version 1.5 message delivery support, the WAS provides message throttling support to control the delivery of messages to endpoint message-driven beans (MDB). We can use this support to avoid overloading the server with a flood of inbound messages.
Message delivery is throttled on a message-driven bean basis by limiting the maximum number of endpoint instances that can be created by the adapter that the MDB is bound to. When the adapter attempts to create an endpoint instance, a proxy for the MDB instance is created and returned as allowed by the JCA 1.5 architecture. There is a one-to-one correspondence between proxies and MDB instances, and like the MDB instances, the proxies are pooled based on the minimum and maximum pool size values associated with the message-driven bean. Throttling is performed through the management of the proxy pool.
At the time the adapter attempts to create an endpoint, if the number of endpoint proxies currently created is equal to the maximum size of the pool, adapter createEndPoint processing returns an Unavailable Exception. When this displays, the adapter does not issue any more createEndPoint() requests until it has released at least one endpoint back to the server for reuse. Thus, installations can control the throttling of message delivery to a JCA 1.5 MDB based on the setting of the maximum size of the pool associated with each JCA 1.5 message-driven bean.
We can specify the pool size using the com.ibm.websphere.ejbcontainer.poolsize JVM system property to define the minimum and maximum pool size of stateless, message-driven, and entity beans. For a message-driven bean that supports JCA 1.5, the maximum pool size value specified limits how many message endpoint instances can be created for that message-driven bean. For example, if the installation sets the maximum size of a JCA 1.5 MDB pool to 5, then at most 5 messages can be concurrently delivered to 5 instances of the message-driven bean. This property can be specified using wsdmin.sh or by specifying it under the administrative console as an environmental variable.
- Open the administrative console.
- Select Servers > Server Types > WebSphere application server > server_name.
- Under Server Infrastructure, expand Java and Process Management >Process Definition.
- Select Servant.
- Under Additional Properties, select Java Virtual Machine.
- Under Additional Properties, select Custom Properties.
- Select New. A panel with three General Properties fields displays. This is where set the property.
- In the Name field, enter com.ibm.websphere.ejbcontainer.poolsize.
- To complete the Value field, see the EJB container system properties for values.
- After defining the value of the property, click OK. We are now prompted to save the changes we have made.
- Click Save.
Related concepts
Message-driven beans and tuning settings on z/OS
Messaging flow for JCA message-driven beans with WebSphere MQ as the messaging provider
Related tasks
Configure MDB or SCA throttling for the default messaging provider
WebSphere MQ messaging provider activation specification advanced properties createWMQActivationSpec command modifyWMQActivationSpec command