public QueueConsumer createQueueListener(final String topic, final ConsumerCallback<Message> messageCallback)
    {
        Preconditions.checkState(connectionFactory != null, "connection factory was never injected!");
        return new QueueConsumer(connectionFactory, jmsConfig, topic, messageCallback);
    }
public QueueConsumer createQueueListener ( final String topic , final ConsumerCallback < Message > messageCallback ) { Preconditions . checkState ( connectionFactory != null , "connection factory was never injected!" ) ; return new QueueConsumer ( connectionFactory , jmsConfig , topic , messageCallback ) ; }
Creates a new {@link QueueConsumer}. For every message received (or when the timeout waiting for messages is hit), the callback
is invoked with the message received.