processMessage runs twice <p>There is a MessageListener listening to processMessage say from user A and when sendMsg is sent form another user to User A , I see processMessage getting invoked twice:</p> <pre><code>public void sendMsg(message){ Message msg = new Message(); mess.setBody(message); // userid is the userid to whom the message will be sent to and chmanage is an instance of Chat Manager Chat chat = chmanage.createChat(&lt;userid&gt;, new CListener()); chat.sendMessage(msg); } class CListener implements MessageListener{ @Override public void processMessage(Chat chat, Message message) { ... //this gets called twice } } </code></pre> <p>Any reasons for this? Should I use something else like create a PacketCollector or PacketListener?</p>