This repository has been archived by the owner on Apr 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from pipefy/eh-main/feature/consumer
Eh main/feature/consumer
- Loading branch information
Showing
39 changed files
with
1,103 additions
and
488 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export AWS_ACCESS_KEY_ID=foo | ||
export AWS_SECRET_ACCESS_KEY=bar | ||
export AWS_ENDPOINT="http://localhost:4566" | ||
export ENABLE_AWS_CLIENT_CONFIG=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,4 +56,5 @@ build-iPhoneSimulator/ | |
# .rubocop-https?--* | ||
|
||
.idea | ||
.rspec_status | ||
.vscode | ||
.rspec_status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,5 @@ group :development, :test do | |
gem "pry-doc" | ||
gem "rspec", "~> 3.0" | ||
gem "rubocop", "~> 1.21" | ||
gem "solargraph" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative "pipefy_message/version" | ||
require_relative "pipefy_message/broker/aws/configuration" | ||
require_relative "pipefy_message/broker/aws/sns/publisher" | ||
require_relative "pipefy_message/base_consumer" | ||
require_relative "pipefy_message/base_publisher" | ||
require_relative "pipefy_message/logger" | ||
require_relative "pipefy_message/logging" | ||
require_relative "pipefy_message/publisher" | ||
require_relative "pipefy_message/consumer" | ||
require_relative "pipefy_message/providers/errors" | ||
|
||
require "logger" | ||
require "json" | ||
require "benchmark" | ||
require "active_support" | ||
require "active_support/core_ext/string/inflections" | ||
|
||
## | ||
# PipefyMessage abstraction async process | ||
## | ||
module PipefyMessage | ||
# Simple Test class to validate the project | ||
class Test | ||
def initialize | ||
@log = PipefyMessage::CustomLogger.new | ||
end | ||
|
||
def publish | ||
payload = { foo: "bar" } | ||
puts Publisher::BasePublisher.new.publish(payload, "pipefy-local-topic") | ||
end | ||
|
||
def consume | ||
@log.info("Starting the consumer process") | ||
consumer = BaseConsumer.new("http://localhost:4566/000000000000/pipefy-local-queue") | ||
@log.info("Creating new instance of consumer #{consumer}") | ||
consumer.consume_message | ||
end | ||
|
||
def publish_and_consume | ||
publish | ||
consume | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.