2014-10-18 4 views
3

Я играл с множеством параметров Jboss, но мне не удалось заставить мой MDB обрабатывать более 10 одновременных сообщений за раз. Это не подходит для моих нужд - мне нужно гораздо больше параллельной обработки сообщений. Я полностью исчерпал идеи. У кого-нибудь есть предложения?Jboss EAP 5.1 - Интеграция с MDB с IBM Websphere MQ - обработано слишком мало параллельных сообщений

Мои MDB (Если бы все определяется как аспект домена, но переместил его):

@MessageDriven(name = "Incoming Task MDB", activationConfig = { 
    @ActivationConfigProperty(propertyName = "messagingType", propertyValue = "javax.jms.MessageListener"), 
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), 
    @ActivationConfigProperty(propertyName = "destination", propertyValue = "TaskQueue"), 
    @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "false") }) 
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) 
@TransactionManagement(value = TransactionManagementType.BEAN) 
// @AspectDomain("Task Queue MDB") JBOSS Specific annotation to inject the MQ server session at runtime 
@ResourceAdapter("wmq.jmsra.rar") 
@org.jboss.ejb3.annotation.DefaultActivationSpecs ({ 
    @javax.ejb.ActivationConfigProperty(propertyName = "channel", propertyValue = "..."), 
    @javax.ejb.ActivationConfigProperty(propertyName = "hostName", propertyValue = "..."), 
    @javax.ejb.ActivationConfigProperty(propertyName = "queueManager", propertyValue = "..."), 
    @javax.ejb.ActivationConfigProperty(propertyName = "port", propertyValue = "1414"), 
    @javax.ejb.ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT"), 
    @javax.ejb.ActivationConfigProperty(propertyName = "pollingInterval", propertyValue = "250"), 
    @javax.ejb.ActivationConfigProperty(propertyName = "rescanInterval", propertyValue = "250"), 
    @ActivationConfigProperty(propertyName="minSession",propertyValue="100"), 
    @ActivationConfigProperty(propertyName="maxSession",propertyValue="100") }) 
@org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=100, timeout=10000) 
public final class IncomingTaskMDB extends TaskCompletionReportable implements MessageListener { 

wmq.jmsra.rar версия:

Specification-Title: J2EE Connector Architecture 
Specification-Version: 1.5 
Implementation-Title: WebSphere MQ Resource Adapter 
Implementation-Version: 7.0.1.3-k701-103-100812 
Implementation-Vendor: IBM Corporation 

В моей wmq.jmsra.rar - я модифицирована ra.xml:

<resourceadapter> 
<resourceadapter-class> 
com.ibm.mq.connector.ResourceAdapterImpl 
</resourceadapter-class> 
<config-property> 
<config-property-name>connectionConcurrency</config-property-name> 
<config-property-type>java.lang.String</config-property-type> 
<config-property-value>100</config-property-value> 
</config-property> 
<config-property> 
<config-property-name>maxConnections</config-property-name> 
<config-property-type>java.lang.String</config-property-type> 
<config-property-value>100</config-property-value> 
</config-property> 

В моих ejb3-перехватчиков-aop.xml:

<domain name="Message Driven Bean" extends="Intercepted Bean" inheritBindings="true"> 
     <bind pointcut="execution(public * *->*(..))"> 
     <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/> 
     <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/> 
     </bind> 
     <!-- TODO: Authorization? --> 
     <bind pointcut="execution(public * *->*(..))"> 
     <interceptor-ref name="org.jboss.ejb3.tx.CMTTxInterceptorFactory"/> 
     <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/> 
     <interceptor-ref name="org.jboss.ejb3.tx.BMTTxInterceptorFactory"/> 
     <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/> 
     <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/> 
     <!-- interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/ --> 
     <stack-ref name="EJBInterceptors"/> 
     </bind> 
     <annotation expr="class(*) AND !class(@org.jboss.ejb3.annotation.Pool)"> 
     @org.jboss.ejb3.annotation.Pool (value="StrictMaxPool", maxSize=100, timeout=10000) 
     </annotation> 

В standardjboss.xml:

<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>false</CreateJBossMQDestination> 
     <!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed --> 
     <MinimumSize>1</MinimumSize> 
     <MaximumSize>100</MaximumSize> 
     <KeepAliveMillis>30000</KeepAliveMillis> 
     <MaxMessages>1</MaxMessages> 
     <MDBConfig> 
      <ReconnectIntervalSec>10</ReconnectIntervalSec> 
      <DLQConfig> 
      <DestinationQueue>queue/DLQ</DestinationQueue> 
      <MaxTimesRedelivered>10</MaxTimesRedelivered> 
      <TimeToLive>0</TimeToLive> 
      </DLQConfig> 
     </MDBConfig> 
     </proxy-factory-config> 
    </invoker-proxy-binding> 
+0

Борьба за ту же самую проблему с Wildfly 10.1 и Wesphere MQ 8.0.0.5 – dmacke

ответ

1

Используйте аннотацию для увеличения сессий сгенерированных из библиотек wsmq. Значение по умолчанию: 10.

@ActivationConfigProperty(propertyName = "maxPoolDepth", propertyValue = "100"), 
Смежные вопросы