Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-4316

Problem with duplicate message detection using ObjectMessage with equal object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 5.8.0
    • AGING_TO_DIE
    • Broker, Message Store
    • None
    • Activemq 5.8.0, Kahadb store.

    Description

      When sending any ObjectMessage that contain an equal object to was been sent before I get from KahaDBStore : Duplicate message add attempt rejected.

      So even if the messageId and commandId is different the message is still detected as a duplicate and ignored.

      A simple test would be to create two objectmessages with "session.createObjectMessage("ANY OBJECT THAT is Equal")" and send to a queue.

      Our code worked with version 5.7.0 and tested amq-store as well as KahaDbstore.

      – activemq config--
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:amq="http://activemq.apache.org/schema/core" xmlns:jms="http://www.springframework.org/schema/jms"
      xmlns:tx="http://www.springframework.org/schema/tx"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
      http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
      http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.4.1.xsd
      http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-3.0.xsd">

      <!-- lets create an embedded ActiveMQ Broker -->
      <amq:broker brokerName="broker" id="broker" useJmx="true" useShutdownHook="false"
      persistent="true" enableStatistics="true">

      <!-- add network http://activemq.apache.org/networks-of-brokers.html -->

      <amq:persistenceAdapter>
      <amq:kahaDB directory="activemq-data/broker/KahaDB" journalMaxFileLength="32mb"/>
      </amq:persistenceAdapter>

      <amq:networkConnectors>
      <amq:networkConnector uri="${server.activemq.networkconnectors.uri}" />
      </amq:networkConnectors>

      <amq:destinationPolicy>
      <amq:policyMap>
      <amq:policyEntries>
      <amq:policyEntry queue=">" optimizedDispatch="true"
      lazyDispatch="false" producerFlowControl="false" memoryLimit="128 mb"
      strictOrderDispatch="true">
      <amq:dispatchPolicy>
      <amq:strictOrderDispatchPolicy />
      </amq:dispatchPolicy>
      <amq:messageGroupMapFactory>
      <amq:simpleMessageGroupMapFactory />
      </amq:messageGroupMapFactory>
      <amq:subscriptionRecoveryPolicy>
      <amq:timedSubscriptionRecoveryPolicy
      recoverDuration="360000" />
      </amq:subscriptionRecoveryPolicy>
      </amq:policyEntry>
      </amq:policyEntries>
      </amq:policyMap>
      </amq:destinationPolicy>

      <amq:systemUsage>
      <amq:systemUsage sendFailIfNoSpace="true" >
      <amq:memoryUsage>
      <amq:memoryUsage limit="256mb" />
      </amq:memoryUsage>
      <amq:storeUsage>
      <amq:storeUsage limit="0" />
      </amq:storeUsage>
      <amq:tempUsage>
      <amq:tempUsage limit="4096mb" />
      </amq:tempUsage>
      </amq:systemUsage>
      </amq:systemUsage>

      <amq:transportConnectors>
      <!--<amq:transportConnector uri="tcp://localhost:0?jms.prefetchPolicy.all=50"
      /> -->
      <amq:transportConnector uri="vm://localhost:0" />
      <amq:transportConnector name="gwt-ajax" uri="tcp://0.0.0.0:${jms.port}"/>
      </amq:transportConnectors>

      </amq:broker>

      <amq:xaConnectionFactory id="jmsFactory"
      brokerURL="${server.activemq.jmsfactory.brokerURL}" />

      <!-- <bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"
      depends-on="broker"> <constructor-arg ref="jmsFactory" /> <property name="sessionCacheSize"
      value="100" /> </bean> -->

      <bean id="connectionFactory" depends-on="broker"
      class="com.atomikos.jms.AtomikosConnectionFactoryBean" init-method="init"
      destroy-method="close">
      <property name="uniqueResourceName" value="borgenBackOfficeJmsConnectionFactory" />
      <property name="xaConnectionFactory" ref="jmsFactory" />
      <property name="maxPoolSize" value="96" />
      <property name="minPoolSize" value="4" />
      </bean>

      <bean id="lifecycleProcessor"
      class="org.springframework.context.support.DefaultLifecycleProcessor">
      <!-- timeout value in milliseconds -->
      <property name="timeoutPerShutdownPhase" value="1500" />
      </bean>

      </beans>

      Attachments

        Activity

          People

            Unassigned Unassigned
            pether James Pether Sörling
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: