atomikos / transactions-essentials

Development repository for next major release of
https://www.atomikos.com/Main/TransactionsEssentials
Other
461 stars 139 forks source link

Random JMS message invoker failure #135

Closed arasheed closed 3 years ago

arasheed commented 3 years ago

We have recently upgraded from Atomikos 3.8.0 to 5.0.8. We have a Spring MDP that reads messages from a input queue and saves to database; however since the upgrade it prints the following error a few times a day randomly. The connection then is recovered and everything goes fine without any need of further action. Any idea what is going on?

WARN org.springframework.jms.listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed for destination 'INPUT_QUEUE' - trying to recover. Cause: null

It is a good old Spring Java application. Not Spring Boot. Spring 5.13.0 IBM MQ 9.0 Java 8.0

Spring config looks like this:

<tx:annotation-driven transaction-manager="jtaTransactionManager"/>

<bean id="inputMqXAConnectionFactory" class="com.ibm.mq.jms.MQXAQueueConnectionFactory">
    <property name="queueManager" value="${...}" />
    <property name="hostName" value="${...}" />
    <property name="channel" value="${...}" />
    <property name="port" value="${...}" />
    <property name="transportType" value="${...}" />
</bean>

<bean id="atomikosInputMqXAConnectionFactory" class="com.atomikos.jms.AtomikosConnectionFactoryBean"
      init-method="init" destroy-method="close">
    <property name="uniqueResourceName" value="inputMq" />
    <property name="xaConnectionFactory" ref="inputMqXAConnectionFactory" />
</bean>

<bean id="inputMqConnectionFactory"
      class="org.springframework.jms.connection.SingleConnectionFactory">
    <property name="targetConnectionFactory" ref="atomikosInputMqXAConnectionFactory" />
</bean>

<!-- MDP listener objects -->
<bean id="inputQueueListener" class="com.miax.tradeclearing.service.listener.InputQueueListenerMDPImpl" autowire="byName"/>

<bean id="inputQueueListenerAdapter" class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
    <property name="delegate" ref="inputQueueListener" />
    <property name="defaultListenerMethod" value="processInputQueue" />
</bean>

<bean id="inputQueueListenerContainer" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    <property name="connectionFactory" ref="inputMqConnectionFactory" />
    <property name="destinationName" value="INPUT_QUEUE" />
    <property name="messageListener" ref="inputQueueListenerAdapter" />
    <property name="transactionManager" ref="jtaTransactionManager" />
    <property name="sessionTransacted" value="true" />
    <property name="concurrentConsumers" value="48" />
    <property name="receiveTimeout" value="3000" />
    <property name="sessionAcknowledgeMode" value="1" />
    <property name="autoStartup" value="true" />
</bean>

jta.properties looks like this: com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory com.atomikos.icatch.console_file_name = tm01.out com.atomikos.icatch.output_dir = /logs com.atomikos.icatch.log_base_dir = /logs com.atomikos.icatch.log_base_name = tm01log com.atomikos.icatch.default_jta_timeout = 60000 com.atomikos.icatch.tm_unique_name = tm01 com.atomikos.icatch.enable_logging=false

GuyPardon commented 3 years ago

Thanks, but this looks like a Spring issue (maybe exposed by the upgrade of Atomikos).

Did you try with the Spring team? If they say it's our fault then we can look further but I see no indication so far about what we could do here...