lib/basquiat/adapters/rabbitmq/requeue_strategies/dead_lettering.rb in basquiat-1.3.0.pre.1 vs lib/basquiat/adapters/rabbitmq/requeue_strategies/dead_lettering.rb in basquiat-1.3.0

- old
+ new

@@ -1,5 +1,6 @@ +# frozen_string_literal: true module Basquiat module Adapters class RabbitMq class DeadLettering < BaseStrategy class << self @@ -9,16 +10,14 @@ @options = { session: { queue: { options: { 'x-dead-letter-exchange' => opts.fetch(:exchange, 'basquiat.dlx') } } }, - dlx: { ttl: opts.fetch(:ttl, 1_000) } } + dlx: { ttl: opts.fetch(:ttl, 1_000) } } end def session_options options.fetch :session - rescue KeyError - raise 'You have to setup the strategy first' end end def initialize(session) super