Class: GovukMessageQueueConsumer::HeartbeatProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/govuk_message_queue_consumer/heartbeat_processor.rb

Instance Method Summary collapse

Instance Method Details

#process(message) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/govuk_message_queue_consumer/heartbeat_processor.rb', line 3

def process(message)
  # Ignore heartbeat messages
  if message.headers.content_type == "application/x-heartbeat"
    message.ack
    return false
  end

  true
end