lib/advanced_sneakers_activejob/handler.rb
# Headers are patched to mimic behavior of "nack" and DLX
Headers are patched to mimic behavior of "nack" and DLX
Headers are patched to mimic behavior of " nack " and DLX
def track_death_in_headers(headers, queue, exchange, routing_key)
      headers['x-first-death-exchange'] ||= exchange
      headers['x-first-death-queue'] ||= queue
      headers['x-first-death-reason'] ||= 'rejected'
      headers['x-death'] ||= []
      if (death = death_header(headers, queue))
        death['count'] += 1
      else
        headers['x-death'] << build_death_row(queue, exchange, routing_key)
      end
    end
def track_death_in_headers ( headers , queue , exchange , routing_key ) headers [ 'x-first-death-exchange' ] ||= exchange headers [ 'x-first-death-queue' ] ||= queue headers [ 'x-first-death-reason' ] ||= 'rejected' headers [ 'x-death' ] ||= [ ] if ( death = death_header ( headers , queue ) ) death [ 'count' ] += 1 else headers [ 'x-death' ] << build_death_row ( queue , exchange , routing_key ) end end
Headers are patched to mimic behavior of "nack" and DLX
Headers are patched to mimic behavior of " nack " and DLX
headers
<not_specific>
queue
<not_specific>
exchange
<not_specific>
routing_key
<not_specific>