activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Hood (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-900) Inconsistent queue browsing and message dequeueing behaviour
Date Tue, 29 Aug 2006 15:44:23 GMT
Inconsistent queue browsing and message dequeueing behaviour
------------------------------------------------------------

                 Key: AMQ-900
                 URL: https://issues.apache.org/activemq/browse/AMQ-900
             Project: ActiveMQ
          Issue Type: Bug
          Components: JMS client
    Affects Versions: 4.0.1
         Environment: Win2K, java 1.5.0_07-b03
            Reporter: Ben Hood
         Attachments: browsing_jms_receiver.7z

I am trying to browse a queue in a monitor thread in a non-transactional session. For each
element in the enumeration, I spawn a worker thread to consume a message in non-blocking fashion
from within a transacted session. This works fine for 1 message. The problem is that when
I enqueue more than one message, subsequent calls to receiveNoWait() return null, although
there must be messages in the queue.

I have created a test case to reproduce this (ActiveMQTestCase) which is part of the m2 project
that I have attached. This can be executed in the normal m2 fashion by running "mvn test"
on the command line.

This problem originally arose when I was using ActiveMQ 4.0.1 as a JMS transport for Mule
1.3rc4 and I created a Mule specific message receiver that tried to exploit the non-transactional
browsing and offloading to transactional worker threads strategy that I have implemented in
the test case.

So to eliminate any interaction from Mule, I used a different JMS provider, and the message
receiver worker fine (with Joram and Weblogic).

I also tried a 4.1-snaphot of ActiveMQ, but it behaved the same as the 4.0.1 release.

So then I wrote a test case using pure JMS against ActiveMQ 4.0.1 (see attachment), and the
behaviour is consistent with that what I was getting from within Mule -  the first message
gets consumed properly, then subsequent messages don't get dequeued.

Therefore I think this may be an issue with ActiveMQ.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message