src/main/java/io/paradoxical/rabbitmq/queues/CallbackBasedQueueConsumer.java
/**
     * Manually invoke pulling an event off the wire and block up to the duration
     *
     * Returns true if a message was consumed
     *
     * @param timeout
     */
Manually invoke pulling an event off the wire and block up to the duration
Returns true if a message was consumed

@param timeout
Manually invoke pulling an event off the wire and block up to the duration Returns true if a message was consumed @param timeout
public synchronized boolean pullNextBlockingRmqMessage(Duration timeout, EventProcessor<T> processor) {
        try {
            if (consumer != null) {
                QueueingConsumer.Delivery delivery = consumer.getConsumer().nextDelivery(timeout.toMillis());
                if (delivery == null) {
                    return false;
                }
                RabbitRawMessage rabbitRawMessage = new RabbitRawMessage(consumer.getConsumer().getConsumerTag(),
                                                                         delivery.getEnvelope(),
                                                                         delivery.getProperties(),
                                                                         delivery.getBody(),
                                                                         consumer.getExchange());
                deliveryHandler(consumer.getConsumer().getChannel(),
                                consumer.getQueue(),
                                rabbitRawMessage,
                                msg -> {
                                    MessageResult messageResult = processor.handleMessage(msg);
                                    return CompletableFuture.completedFuture(messageResult);
                                });
                return true;
            }
        }
        catch (Throwable ex) {
            logger.error(ex, "Error getting message!");
        }
        return false;
    }
public synchronized boolean pullNextBlockingRmqMessage ( Duration timeout , EventProcessor < T > processor ) { try { if ( consumer != null ) { QueueingConsumer . Delivery delivery = consumer . getConsumer ( ) . nextDelivery ( timeout . toMillis ( ) ) ; if ( delivery == null ) { return false ; } RabbitRawMessage rabbitRawMessage = new RabbitRawMessage ( consumer . getConsumer ( ) . getConsumerTag ( ) , delivery . getEnvelope ( ) , delivery . getProperties ( ) , delivery . getBody ( ) , consumer . getExchange ( ) ) ; deliveryHandler ( consumer . getConsumer ( ) . getChannel ( ) , consumer . getQueue ( ) , rabbitRawMessage , msg -> { MessageResult messageResult = processor . handleMessage ( msg ) ; return CompletableFuture . completedFuture ( messageResult ) ; } ) ; return true ; } } catch ( Throwable ex ) { logger . error ( ex , "Error getting message!" ) ; } return false ; }
Manually invoke pulling an event off the wire and block up to the duration
 Returns true if a message was consumed
Manually invoke pulling an event off the wire and block up to the duration Returns true if a message was consumed
// timeout