Class: BBK::AMQP::RejectionPolicies::Requeue
- Inherits:
-
Object
- Object
- BBK::AMQP::RejectionPolicies::Requeue
- Defined in:
- lib/bbk/amqp/rejection_policies/requeue.rb
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
- #call(message, error, *_args, **_kwargs) ⇒ Object
-
#initialize(logger: BBK::Utils::Logger.default) ⇒ Requeue
constructor
A new instance of Requeue.
Constructor Details
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/bbk/amqp/rejection_policies/requeue.rb', line 6 def logger @logger end |
Instance Method Details
#call(message, error, *_args, **_kwargs) ⇒ Object
12 13 14 15 |
# File 'lib/bbk/amqp/rejection_policies/requeue.rb', line 12 def call(, error, *_args, **_kwargs) logger.debug "Requeue message #{.headers[:type]}[#{.headers[:message_id]}] delivery tag: #{.delivery_info[:delivery_tag].to_i}. Error: #{error.inspect}" .delivery_info[:channel].reject .delivery_info[:delivery_tag], true end |