Class: BBK::AMQP::RejectionPolicies::Reject
- Inherits:
-
Object
- Object
- BBK::AMQP::RejectionPolicies::Reject
- Defined in:
- lib/bbk/amqp/rejection_policies/reject.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) ⇒ Reject
constructor
A new instance of Reject.
Constructor Details
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
6 7 8 |
# File 'lib/bbk/amqp/rejection_policies/reject.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/reject.rb', line 12 def call(, error, *_args, **_kwargs) logger.debug "Reject 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], false end |