activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fungrim <cont...@larsan.net>
Subject Message acknowledgement synchronization problem
Date Fri, 25 May 2007 10:47:40 GMT

Hello, I'm not entirely sure of what the JMS spec. says about this, so I'm
posting this as a question rather than a bug. We have a system with
asynchronous message "execution" taking messages of an ActiveMQ queue with
message groups enabled. It turns out that the code for ack'ing separate
messages uses a bit of unsafe code in their (shared) session. We're using
ActiveMQ 4.1.0. This stack trace explains the problem:

>>>
Caused by: java.lang.NullPointerException
   at org.apache.activemq.command.MessageAck.<init>(MessageAck.java:66)
   at
org.apache.activemq.ActiveMQMessageConsumer.acknowledge(ActiveMQMessageConsumer.java:747)
   at
org.apache.activemq.ActiveMQSession.acknowledge(ActiveMQSession.java:1381)
   at
org.apache.activemq.ActiveMQMessageConsumer$1.execute(ActiveMQMessageConsumer.java:444)
   at
org.apache.activemq.command.ActiveMQMessage.acknowledge(ActiveMQMessage.java:95) 
>>>

(Ie. the ActiveMQMessageConsumer is not thread safe)

So the question is, is this the correct behaviour? I can obviously force a
synchronization on the session object on my end, but that seems like a
somewhat ugly sollution.

Regards
/Lars J. Nilsson
-- 
View this message in context: http://www.nabble.com/Message-acknowledgement-synchronization-problem-tf3815389s2354.html#a10800690
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message