src/main/java/com/rapportive/storm/spout/AMQPSpout.java
/**
     * Tells the AMQP broker to drop (Basic.Reject) the message.
     *
     * <p><strong>N.B.</strong> this does <em>not</em> requeue the message:
     * failed messages will simply be dropped.  This is to prevent infinite
     * redelivery in the event of non-transient failures (e.g. malformed
     * messages).  However it means that messages will <em>not</em> be retried
     * in the event of transient failures.</p>
     *
     * <p><strong>TODO</strong> make this configurable.</p>
     */
Tells the AMQP broker to drop (Basic.Reject) the message.
N.B. this does not requeue the message:
failed messages will simply be dropped.  This is to prevent infinite
redelivery in the event of non-transient failures .  However it means that messages will not be retried
in the event of transient failures.


Tells the AMQP broker to drop ( Basic . Reject ) the message . N . B . this does not requeue the message : failed messages will simply be dropped . This is to prevent infinite redelivery in the event of non - transient failures . However it means that messages will not be retried in the event of transient failures .
@Override
    public void fail(Object msgId) {
        if (msgId instanceof Long) {
            final long deliveryTag = (Long) msgId;
            if (amqpChannel != null) {
                try {
                    amqpChannel.basicReject(deliveryTag, false /* don't requeue */);
                } catch (IOException e) {
                    log.warn("Failed to reject delivery-tag " + deliveryTag, e);
                }
            }
        } else {
            log.warn(String.format("don't know how to reject(%s: %s)", msgId.getClass().getName(), msgId));
        }
    }
@ Override public void fail ( Object msgId ) { if ( msgId instanceof Long ) { final long deliveryTag = ( Long ) msgId ; if ( amqpChannel != null ) { try { amqpChannel . basicReject ( deliveryTag , false /* don't requeue */ ) ; } catch ( IOException e ) { log . warn ( "Failed to reject delivery-tag " + deliveryTag , e ) ; } } } else { log . warn ( String . format ( "don't know how to reject(%s: %s)" , msgId . getClass ( ) . getName ( ) , msgId ) ) ; } }
Tells the AMQP broker to drop (Basic.Reject) the message.
Tells the AMQP broker to drop ( Basic . Reject ) the message .