def onMessage(message)
      begin
        if @message_count
          @message_count += 1
          @last_time     = Time.now
        end
        logger.measure_debug('Message processed') do
          @proc.call message
        end
      rescue SyntaxError, NameError => exc
        logger.error "Ignoring poison message:\n#{message.inspect}", exc
      rescue StandardError => exc
        logger.error "Ignoring poison message:\n#{message.inspect}", exc
      rescue Exception => exc
        logger.error "Ignoring poison message:\n#{message.inspect}", exc
      end
    end
def onMessage(message)
      begin
        if @message_count
          @message_count += 1
          @last_time     = Time.now
        end
        logger.measure_debug('Message processed') do
          @proc.call message
        end
      rescue SyntaxError, NameError => exc
        logger.error "Ignoring poison message:\n#{message.inspect}", exc
      rescue StandardError => exc
        logger.error "Ignoring poison message:\n#{message.inspect}", exc
      rescue Exception => exc
        logger.error "Ignoring poison message:\n#{message.inspect}", exc
      end
    end
Parameters:
   :statistics Capture statistics on how many messages have been read
      true  : This method will capture statistics on the number of messages received
              and the time it took to process them.
              The timer starts when the listener instance is created and finishes when either the last message was received,
              or when Destination::statistics is called. In this case MessageConsumer::statistics
              can be called several times during processing without affecting the end time.
              Also, the start time and message count is not reset until MessageConsumer::each
              is called again with statistics: true

              The statistics gathered are returned when statistics: true and async: false
 Method called for every message received on the queue
 Per the JMS specification, this method will be called sequentially for each message on the queue.
 This method will not be called again until its prior invocation has completed.
 Must be onMessage() since on_message() does not work for interface methods that must be implemented