activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guy Hoshea (JIRA)" <j...@apache.org>
Subject [jira] Closed: (AMQ-3156) Active MQ lose messages which were published on topic
Date Thu, 27 Jan 2011 14:08:45 GMT

     [ https://issues.apache.org/jira/browse/AMQ-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Guy Hoshea closed AMQ-3156.
---------------------------

    Resolution: Fixed

There are 2 issues here:
1.
When configuring org.springframework.jms.listener.DefaultMessageListenerContainer 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.
Using CACHE_CONSUMER solves this issue.

2.
This below exception in activeMQ log:
INFO   | jvm 1    | 2011/01/27 11:35:56 | java.net.SocketException: Software caused connection
abort: recv failed
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at java.net.SocketInputStream.socketRead0(Native
Method)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at java.net.SocketInputStream.read(SocketInputStream.java:129)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at org.apache.activemq.transport.tcp.TcpBufferedInputStream.fill(TcpBufferedInputStream.java:50)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:58)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at java.io.DataInputStream.readInt(DataInputStream.java:370)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:269)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:210)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:202)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:185)
INFO   | jvm 1    | 2011/01/27 11:35:56 | 	at java.lang.Thread.run(Thread.java:619)

This exception is because we have applicative keep alive that creates connection and session
each 2 seconds and than close them.

> 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.


Mime
View raw message