Sha256: ec983f576d94b34abab366a6d7a4e52d7f06f1bdbfd186a5e748ac61db2d0d35
Contents?: true
Size: 754 Bytes
Versions: 9
Compression:
Stored size: 754 Bytes
Contents
require 'aws-sdk' module Sqspoller class SnsForwarder def initialize args @sns = Aws::SNS::Client.new access_key_id: args[:access_key_id], secret_access_key: args[:secret_access_key], region: args[:region] @topic_arn = args[:sns_topic_arn] @logger = args[:logger] @logger.info " Inializing SnsForwarder with SNS topic arn: #{@topic_arn}" end def process message, message_id @logger.info " Processing message" @logger.info " Publishing to #{@topic_arn}" response = @sns.publish topic_arn: @topic_arn, message: message @logger.info " SNS response message id: #{response.message_id}" end end end
Version data entries
9 entries across 9 versions & 1 rubygems