lib/postman/message.rb
# Re-queue the message for later processing
# Remove from the standard queue
Re-queue the message for later processing
Remove from the standard queue
Re - queue the message for later processing Remove from the standard queue
def delay(exception)
      warn "Delay: #{payload}"
      warn exception.message
      if attempt <= max_retries
        delay_exchange.publish(payload, routing_key: postman.requeue_key, headers: { attempts: attempt + 1 })
        main_exchange.ack(delivery_tag)
      else
        deadletter(exception)
      end
    end
def delay ( exception ) warn "Delay: #{payload}" warn exception . message if attempt <= max_retries delay_exchange . publish ( payload , routing_key : postman . requeue_key , headers : { attempts : attempt + 1 } ) main_exchange . ack ( delivery_tag ) else deadletter ( exception ) end end
Re-queue the message for later processing
Remove from the standard queue
Re - queue the message for later processing Remove from the standard queue
# Publish the message to the delay queue # Acknowledge the original message
exception
<not_specific>