activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vijayaratha <rat...@wso2.com>
Subject Messages are repetedly sends by the queue..
Date Wed, 13 Jul 2011 05:31:34 GMT
Hi,
I have an issue with activemq 5.4.2 version..
where QueueBrowser.getEnumeration().next element() retrieves same messages..
any idea on this?
this was working in 5.3.2. I version
       
any help regarding this would be helpful..

Thanks
-ratha..

This is my code segment;


   try{
            con = getReadConnection();
            session = JMSUtil.createSession(con,jmsSpec11);
            Destination destination = getDestination(session);

            browser = session.createBrowser((Queue) destination);
            Enumeration enumeration = browser.getEnumeration();

            if (enumeration.hasMoreElements()) {
                Object msg = enumeration.nextElement();

                JMSPersistentMessage jmsMeg = (JMSPersistentMessage)
((ObjectMessage) msg).getObject();
                messageContext =
jmsPersistentMessageHelper.createMessageContext(jmsMeg);
            }

        } catch (JMSException e) {
            log.error("JMS error while retrieving messages from the store: "
+ name, e);
            error = true;
            throw new SynapseException("JMS Message Store Exception " + e);
        } finally {
            cleanupJMSResources(con, session, browser, error,
ConnectionType.READ_CONNECTION);
        } 

--
View this message in context: http://activemq.2283324.n4.nabble.com/Messages-are-repetedly-sends-by-the-queue-tp3664255p3664255.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message