[ 
https://issues.apache.org/activemq/browse/CAMEL-2922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60643#action_60643
 ] 

Mark Ford commented on CAMEL-2922:
----------------------------------

I haven't had a chance to look at integrating my test into the integration 
tests for this component. 

However, the snippet below is almost the same as what was originally applied 
and mistakenly overwritten. My only change is to call the non-blocking 
pollMessage() instead of nextMessage(). The non-blocking call seems safer in 
case the packet listener that's doing the collecting hasn't been called yet.

The diff below is from the 2.1.0 base. The method (public void 
processMessage(Chat chat, Message message)) is the same in the 2.4-SNAPSHOT 
version.

Index: XmppConsumer.java
===================================================================
--- XmppConsumer.java   (revision 960908)
+++ XmppConsumer.java   (working copy)
@@ -130,5 +130,9 @@
         } catch (Exception e) {
             exchange.setException(e);
         }
+        
+        if (muc != null) {
+            muc.pollMessage();
+        }
     }
 }


> XMPPConsumer does not remove the message which causes OOME with XMPP
> --------------------------------------------------------------------
>
>                 Key: CAMEL-2922
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2922
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-xmpp
>    Affects Versions: 2.1.0, 2.2.0, 2.3.0
>            Reporter: Claus Ibsen
>             Fix For: 2.5.0
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to