class Conrad::Emitters::Sqs

Basic emitter for sending events to AWS's sqs. If all access information is given, the given credentials will be used. Otherwise, the emitter will attempt to use values configured in the running environment according to the AWS SDK documentation (such as from ~/.aws/credentials).

Attributes

queue_url[RW]

@return [String] the configured SQS queue URL

Public Class Methods

client_class() click to toggle source
# File lib/conrad/emitters/sqs.rb, line 23
def client_class
  Aws::SQS::Client
end

Public Instance Methods

call(event) click to toggle source

Sends an event up to SQS

@param event [String] the event to be sent as an SQS message body

# File lib/conrad/emitters/sqs.rb, line 18
def call(event)
  client.send_message(queue_url: queue_url, message_body: event)
end