You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rafiki <ra...@taisis.com> on 2012/12/04 10:23:20 UTC

How to unlock a queue?

I have the next situation:

+ An ActiveMQ stand alone Broker.
+ A JMS message producer sending 1MB message to a queue named "DATA" in a
non transactional mode.
+ A JMS message consumer reading in transactional mode from the same queue.
The consumer reads a message and then write it to a file. If it is written
ok then make a commit, if not, rollback.

I try to make a failure test, so when producer and consumer are working, I
kill the consumer process. ActiveMQ displays in log a Warning about a
"EOFException", and the queue is blocked. I can't write or read more message
using this queue. I have to delete the queue in order to continue using it, 
with the consequent loss of data.

I reproduce this scenario with ActiveMQ 5.7.0, 5.5.1 and 5.4.3. I search in
google about this problem, but i don't find a way  to unlock the queue. Any
idea?

My O.S. is Debian "Wheezy" under VirtualBox, and working under OpenJDK
version 1.6.0_24

Thanks in advance



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-unlock-a-queue-tp4660154.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How to unlock a queue?

Posted by rafiki <ra...@taisis.com>.
Thanks for the answer.

That's what I see:

+ Producer and consumer are working OK with "DESARROLLO.DATA" queue.
+ Consumer is unregistered from destination after killing it
+ Producer freezes trying to send next message.
+ I Stop producer and start it again.
+ Producer sends message to other queues correctly, and freezes when it
start to send message to DATA queue.

Here you can see the log when I kill consumer: http://pastebin.com/AKATx854

Here, when I start the producer again: http://pastebin.com/TYe37SfB

As you can see in the log, the producer process sends 2 message to 2
diferent queues without problem, then it try to send a message to
"DESARROLLO.DATA" queue and the message never arrives. With jconsole I can
see that producer is conected to DESARROLLO.DATA queue.



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-unlock-a-queue-tp4660154p4660170.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How to unlock a queue?

Posted by Torsten Mielke <to...@fusesource.com>.
This should not happen. 
If you enable debug logging in the broker, you should see that the transactions is rolled back when the client disconnects as part of killing it.
Other consumers should still have access to the destination and should be able to consume messages. 

Can you check using jconsole that the consumer is unregistered from the destination DATA after killing it? 

Regards,

Torsten Mielke
torsten@fusesource.com
tmielke.blogspot.com




On Dec 4, 2012, at 10:23 AM, rafiki wrote:

> 
> I have the next situation:
> 
> + An ActiveMQ stand alone Broker.
> + A JMS message producer sending 1MB message to a queue named "DATA" in a
> non transactional mode.
> + A JMS message consumer reading in transactional mode from the same queue.
> The consumer reads a message and then write it to a file. If it is written
> ok then make a commit, if not, rollback.
> 
> I try to make a failure test, so when producer and consumer are working, I
> kill the consumer process. ActiveMQ displays in log a Warning about a
> "EOFException", and the queue is blocked. I can't write or read more message
> using this queue. I have to delete the queue in order to continue using it, 
> with the consequent loss of data.
> 
> I reproduce this scenario with ActiveMQ 5.7.0, 5.5.1 and 5.4.3. I search in
> google about this problem, but i don't find a way  to unlock the queue. Any
> idea?
> 
> My O.S. is Debian "Wheezy" under VirtualBox, and working under OpenJDK
> version 1.6.0_24
> 
> Thanks in advance
> 
> 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/How-to-unlock-a-queue-tp4660154.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.