在JBOSS中配置MDB
maxMessages属性如何影响MDB? 例如:在JBOSS中配置MDB,jboss,ejb-3.0,jboss-mdb,Jboss,Ejb 3.0,Jboss Mdb,maxMessages属性如何影响MDB? 例如: @ActivationConfigProperty(propertyName = "maxMessages", propertyValue="5"). 如果maxSessions是10,这个值会有什么影响?他们对此有点含糊不清,他们说MaxMessages的定义是 要等待的消息数 在尝试交付之前 会话中,每条消息仍然是 在单独交易中交付 (默认值1) 我想您可能想知道它是否会影响一次通过MDB的线程数或并发会话数,但似乎此参数与该行为无关,
@ActivationConfigProperty(propertyName = "maxMessages", propertyValue="5").
如果maxSessions是10,这个值会有什么影响?他们对此有点含糊不清,他们说MaxMessages的定义是
要等待的消息数
在尝试交付之前
会话中,每条消息仍然是
在单独交易中交付
(默认值1)
我想您可能想知道它是否会影响一次通过MDB的线程数或并发会话数,但似乎此参数与该行为无关,因此没有冲突。他们对此有点含糊不清,他们说MaxMessages定义为
要等待的消息数
在尝试交付之前
会话中,每条消息仍然是
在单独交易中交付
(默认值1)
我想您可能想知道它是否会影响一次可以通过MDB的线程数或并发会话数,但似乎此参数与该行为无关,因此没有冲突。我想您可能会感到困惑,
maxSessions
指的是可以同时向MDB传递消息的JMS会话的最大数量。我想您可能会感到困惑,maxSessions
是指可以同时向MDB传递消息的JMS会话的最大数量。在xml confi文件standardjboss.xml中,您可以设置MaximumSize来设置并发消息的数量。在这种情况下,我将其设置为150。但是,这会影响所有MDB
<invoker-proxy-binding>
<name>message-driven-bean</name>
<invoker-mbean>default</invoker-mbean>
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
<proxy-factory-config>
<JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
<ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
<CreateJBossMQDestination>true</CreateJBossMQDestination>
<!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
<MinimumSize>1</MinimumSize>
**<MaximumSize>150</MaximumSize>**
<KeepAliveMillis>30000</KeepAliveMillis>
<MaxMessages>1</MaxMessages>
<MDBConfig>
<ReconnectIntervalSec>10</ReconnectIntervalSec>
<DLQConfig>
<DestinationQueue>queue/DLQ</DestinationQueue>
<MaxTimesRedelivered>200</MaxTimesRedelivered>
<TimeToLive>0</TimeToLive>
</DLQConfig>
</MDBConfig>
</proxy-factory-config>
</invoker-proxy-binding>
消息驱动bean
违约
org.jboss.ejb.plugins.jms.JMSContainerInvoker
DefaultJMSProvider
StdJMSPool
真的
1.
**150**
30000
1.
10
队列/DLQ
200
0
在xml confi文件standardjboss.xml中,您可以设置MaximumSize来设置并发消息的数量。在这种情况下,我将其设置为150。但是,这会影响所有MDB
<invoker-proxy-binding>
<name>message-driven-bean</name>
<invoker-mbean>default</invoker-mbean>
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
<proxy-factory-config>
<JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
<ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
<CreateJBossMQDestination>true</CreateJBossMQDestination>
<!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->
<MinimumSize>1</MinimumSize>
**<MaximumSize>150</MaximumSize>**
<KeepAliveMillis>30000</KeepAliveMillis>
<MaxMessages>1</MaxMessages>
<MDBConfig>
<ReconnectIntervalSec>10</ReconnectIntervalSec>
<DLQConfig>
<DestinationQueue>queue/DLQ</DestinationQueue>
<MaxTimesRedelivered>200</MaxTimesRedelivered>
<TimeToLive>0</TimeToLive>
</DLQConfig>
</MDBConfig>
</proxy-factory-config>
</invoker-proxy-binding>
消息驱动bean
违约
org.jboss.ejb.plugins.jms.JMSContainerInvoker
DefaultJMSProvider
StdJMSPool
真的
1.
**150**
30000
1.
10
队列/DLQ
200
0