def receive(queue, header, message, options, &block)
      begin
        if options[:no_unserialize] || @serializer.nil?
          execute_callback(block, @identity, message, header)
        elsif message == "nil"
          # This happens as part of connecting an instance agent to a broker prior to version 13
          header.ack if options[:ack]
          logger.debug("RECV #{@alias} nil message ignored")
        elsif (packet = unserialize(queue, message, options))
          execute_callback(block, @identity, packet, header)
        elsif options[:ack]
          # Need to ack empty packet since no callback is being made
          header.ack
        end
        true
      rescue StandardError => e
        header.ack if options[:ack]
        logger.exception("Failed receiving message from queue #{queue.inspect} on broker #{@alias}", e, :trace)
        @exception_stats.track("receive", e)
        update_non_delivery_stats("receive failure", e)
      end
    end
def receive(queue, header, message, options, &block)
      begin
        if options[:no_unserialize] || @serializer.nil?
          execute_callback(block, @identity, message, header)
        elsif message == "nil"
          # This happens as part of connecting an instance agent to a broker prior to version 13
          header.ack if options[:ack]
          logger.debug("RECV #{@alias} nil message ignored")
        elsif (packet = unserialize(queue, message, options))
          execute_callback(block, @identity, packet, header)
        elsif options[:ack]
          # Need to ack empty packet since no callback is being made
          header.ack
        end
        true
      rescue StandardError => e
        header.ack if options[:ack]
        logger.exception("Failed receiving message from queue #{queue.inspect} on broker #{@alias}", e, :trace)
        @exception_stats.track("receive", e)
        update_non_delivery_stats("receive failure", e)
      end
    end
Receive message by optionally unserializing it, passing it to the callback, and optionally
 acknowledging it

 === Parameters
 queue(String):: Name of queue
 header(AMQP::Protocol::Header):: Message header
 message(String):: Serialized packet
 options(Hash):: Subscribe options
   :ack(Boolean):: Whether caller takes responsibility for explicitly acknowledging each
     message received, defaults to implicit acknowledgement in AMQP as part of message receipt
   :no_unserialize(Boolean):: Do not unserialize message, this is an escape for special
     situations like enrollment, also implicitly disables receive filtering and logging;
     this option is implicitly invoked if initialize without a serializer

 === Block
 Block with following parameters to be called with received message
   identity(String):: Serialized identity of broker delivering the message
   message(Packet|String):: Message received, which is unserialized unless :no_unserialize was specified
   header(AMQP::Protocol::Header):: Message header (optional block parameter)

 === Return
 true:: Always return true