MessageConsumer consumer = new MessageConsumer();
AMQPTopicReceiver receiver = new AMQPTopicReceiverImpl(properties, consumer);
System.out.println("Waiting for topic messages : \n");
AMQPRoutingKey key = new AMQPRoutingKey("workflowTerminated", "");
receiver.Subscribe(key);
}
public static class MessageConsumer implements AMQPCallback {
public void onMessage(String message) {
System.out.println("Received : " + message);