You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2011/01/25 19:26:48 UTC

[jira] Commented: (AMQ-3156) Active MQ lose messages which were published on topic

    [ https://issues.apache.org/jira/browse/AMQ-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986579#action_12986579 ] 

Gary Tully commented on AMQ-3156:
---------------------------------

with cache none, a new consumer is created for each receive, leaving no consumer for some duration. When there is no consumer, topic messages are dropped.
Use a durable consumer or CACHE_CONSUMER, with a single consumer with default prefetch, it makes sense to cache it.

> Active MQ lose messages which were published on topic
> -----------------------------------------------------
>
>                 Key: AMQ-3156
>                 URL: https://issues.apache.org/jira/browse/AMQ-3156
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.2.0
>            Reporter: Guy Hoshea
>         Attachments: activemq.log, activemq.xml
>
>
> We use Spring framework with Active MQ. We publish messages to a topic.
> We have one consumer. The publisher published message with attributes.
> The consumer filters messages by selector on those attributes.
> Once in a while a message does not reach the consumer. There are no errors in logs. No disconnection are seen in logs.
> Spring configuration on publisher side:
> 	<bean id="connectionFactory" class="com.icap.dealfeed.common.jms.FailoverableCachingConnectionFactory">
> 		<!--  starting with empty impl, later the real impl will be injected -->
> 		<property name="targetConnectionFactory">
> 			<bean class="com.icap.dealfeed.common.jms.ConnectionFactoryEmptyImpl">
> 			</bean>
> 		</property>
> 		<property name="sessionCacheSize"      value="5"/>
> 	</bean>
> Spring beans on consumer side:
> 	<bean id="rangeUpdateMessageListenerContainer"
>                  class="org.springframework.jms.listener.DefaultMessageListenerContainer">
> 		<property name="connectionFactory"     ref="connectionFactory" />
> 		<!-- Using the CACHE_NONE so Application Resilience will work -->
> 		<property name="cacheLevelName"      value="CACHE_NONE"/>
> 		<property name="destinationName"     value="${jmsRangeUpdateTopicName}"/>
> 		<property name="pubSubDomain"        value="true"/>
> 		<property name="messageListener"       ref="rangeUpdatesMessageListener"/>
> 		<property name="exceptionListener"     ref="rangeUpdatesMessageListener"/>
> 		<!-- Because its topic there should be no concurrentConsumers, so both following values are 1-->
> 		<property name="concurrentConsumers"    value="1"/>
> 		<property name="maxConcurrentConsumers" value="1"/>
> 		<!--  starting on purpose with dummy selector -->
> 		<property name="messageSelector"     value="dummy = 123"/>
> 		<property name="autoStartup"         value="false"/>
> 	</bean>
> 	<bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
> 		<property name="targetConnectionFactory" ref="emptyImplConnectionFactory"/>
> 		<property name="sessionCacheSize"      value="5"/>
> 	</bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.