Hi,

We have an Artemis server (1.1.0) with a transacted consumer. 

The consumer is an Apache Camel (2.15.2) route running in Karaf 3.0.4. We
are using the ActiveMQ 5.12.0 libraries.

Within the transaction, the message is marked as being delivered (i.e.
accessible from listDeliveringMessages), however, if the consumer crashes
before commiting, the message stays with this status. This means, after the
application starts, and tries to consume from the queue it doesn't get that
message. This status never seems to update, leaving the message in limbo.

Further, if we send any new requests to the same queue, they all get marked
as being delivered - even if the application hasn't been restarted yet.

After the crash, the server correctly shows that there are 0 connections.
However, the queue still thinks there are consumers.

The only way to get things going again is to restart the broker.

If I change the consumer to not use transactions and set the acknowledge
mode to CLIENT_ACKNOWLEDGE, then I get the same behaviour.

Any help would be appreciated.
Steve.

This is the camel queue configuration:

    <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
        <property name="connectionFactory" ref="poolConnectionFactory"/>
        <property name="transacted" value="true"/>
        <property name="transactionManager" ref="jmsTransactionManager"/>
        <property name="cacheLevelName" value="CACHE_CONSUMER" />
    </bean>

    <bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
        <property name="connectionFactory" ref="poolConnectionFactory"/>
    </bean>

    <bean id="poolConnectionFactory"
class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start"
destroy-method="stop">
        <property name="maxConnections" value="${activemq.maxConnections}"/>
        <property name="connectionFactory" ref="jmsConnectionFactory"/>
        <property name="idleTimeout" value="0"/>
    </bean>

    <bean id="jmsConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="${activemq.brokerURL}"/>
    </bean>

    <bean id="required"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
        <property name="transactionManager" ref="jmsTransactionManager"/>
        <property name="propagationBehaviorName"
value="PROPAGATION_REQUIRED"/>
    </bean>

This is the broker config:
<?xml version='1.0'?>


<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
               xsi:schemaLocation="urn:activemq
/schema/artemis-configuration.xsd">

   <jms xmlns="urn:activemq:jms">
      <queue name="DLQ"/>
      <queue name="ExpiryQueue"/>

   </jms>

   <core xmlns="urn:activemq:core">

      
      <journal-type>ASYNCIO</journal-type>

      <paging-directory>./data/paging</paging-directory>

      <bindings-directory>./data/bindings</bindings-directory>

      <journal-directory>./data/journal</journal-directory>

     
<large-messages-directory>./data/large-messages</large-messages-directory>

      <journal-min-files>10</journal-min-files>

      
      <journal-buffer-timeout>64000</journal-buffer-timeout>


      <acceptors>
         
         
         <acceptor
name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor>

         
         <acceptor name="amqp">tcp://0.0.0.0:5672?protocols=AMQP</acceptor>

         
         <acceptor
name="stomp">tcp://0.0.0.0:61613?protocols=STOMP</acceptor>

         
         <acceptor
name="hornetq">tcp://0.0.0.0:5445?protocols=HORNETQ,STOMP</acceptor>

         
         <acceptor name="mqtt">tcp://0.0.0.0:1883?protocols=MQTT</acceptor>
      </acceptors>


      <security-settings>
         <security-setting match="#">
            <permission type="createNonDurableQueue" roles="amq"/>
            <permission type="deleteNonDurableQueue" roles="amq"/>
            <permission type="createDurableQueue" roles="amq"/>
            <permission type="deleteDurableQueue" roles="amq"/>
            <permission type="consume" roles="amq"/>
            <permission type="send" roles="amq"/>
            
            <permission type="manage" roles="amq"/>
         </security-setting>
      </security-settings>

      <address-settings>
                
                <address-setting match="#">
                        <max-size-bytes>104857600</max-size-bytes>
                        <page-size-bytes>10485760</page-size-bytes>
                        <address-full-policy>PAGE</address-full-policy>        
                </address-setting>
      </address-settings>
   </core>
</configuration>





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Artemis-all-messages-go-to-Delivering-after-a-client-crash-tp4702940.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to