//config.setDebuggerEnabled(true);
//
XMPPConnection consumerCon = new XMPPConnection(config);
consumerCon.connect();
consumerCon.login("consumer", "consumer");
MultiUserChat consumerMuc = new MultiUserChat(consumerCon, "muc-test");
consumerMuc.join("consumer");
final ConsumerMUCMessageListener listener = new ConsumerMUCMessageListener();
consumerMuc.addMessageListener(listener);
XMPPConnection producerCon = new XMPPConnection(config);
producerCon.connect();
producerCon.login("producer", "producer");
MultiUserChat producerMuc = new MultiUserChat(producerCon, "muc-test");
producerMuc.join("producer");
for (int i = 0; i < 10; i++) {
LOG.info("Sending message: " + i);
Message message = producerMuc.createMessage();
message.setBody("Hello from producer, message # " + i);
producerMuc.sendMessage(message);
}
LOG.info("Sent all messages!");
assertTrue("Consumer received - " + listener.getMessageCount(), Wait.waitFor(new Wait.Condition() {
@Override