-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.rb
41 lines (31 loc) · 954 Bytes
/
config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require 'circuitry'
require 'dotenv'
Dotenv.load
Circuitry.publisher_config do |c|
c.access_key = ENV.fetch('AWS_ACCESS_KEY')
c.secret_key = ENV.fetch('AWS_SECRET_KEY')
c.region = ENV.fetch('AWS_REGION')
c.async_strategy = :thread
c.on_async_exit = proc do
puts "Publisher done."
end
# TODO: replace this with a list of topics that will be published to
c.topic_names = %W[
example-circuitry-topic
]
end
Circuitry.subscriber_config do |c|
c.access_key = ENV.fetch('AWS_ACCESS_KEY')
c.secret_key = ENV.fetch('AWS_SECRET_KEY')
c.region = ENV.fetch('AWS_REGION')
c.async_strategy = :thread
c.on_async_exit = proc do
puts "Subscriber done."
end
# TODO: rename the queue to something more meaningful for your project
c.queue_name = 'example-circuitry-queue'
# TODO: replace this with a list of topics that the queue should subscribe to
c.topic_names = %W[
example-circuitry-topic
]
end