}
private void onMessage(MessageMessage message) throws InterceptException, InterruptedException {
messageCount++;
if (messageCount < 100) {
AckMessage ack = new AckMessage(message.getHeader().getMessageId());
gateway.broadcastMessage(ack);
}
if (messageCount == 100) {
System.out.println("Received all expected messages from subscription");
sendUnsubscribe("subscription");