jsonapi_publisher 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi_publisher/version.rb +1 -1
- data/lib/jsonapi_publisher.rb +3 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8024fc44a64373bfe0dc9d9ccbce9b4755e28ac9
|
4
|
+
data.tar.gz: 35b1e5c6846c1deb561caf4f581ac6642fa27351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12f4c04412069290d3987f6c033da9373541fe7d55a52e4ed110dddc7ca04740f954ba9652c984d16168504ff4b03eef03f2b8e251c121526458863f03e46595
|
7
|
+
data.tar.gz: a953ab77d84b31ab067b64af1107afe9f706e0da070b3cf3807e534f18db2df8fd3bb3baec0038e004431834a542e8d795b6aec46d7fafe0884947e4b9b06d51
|
data/lib/jsonapi_publisher.rb
CHANGED
@@ -26,9 +26,9 @@ module JsonapiPublisher
|
|
26
26
|
elsif configuration.qservice == 'sqs'
|
27
27
|
message_attributes = { routing_key: { string_value: routing_key, data_type: 'String' } }
|
28
28
|
if configuration.avoid_send
|
29
|
-
p; p "Requesting with queue_url: #{ENV['QUEUE_URL'] || channel
|
29
|
+
p; p "Requesting with queue_url: #{ENV['QUEUE_URL'] || channel}, message_body: #{message.to_json}, message_attributes: #{message_attributes}"
|
30
30
|
else
|
31
|
-
connection.send_message(queue_url: ENV['QUEUE_URL'] || channel
|
31
|
+
connection.send_message(queue_url: ENV['QUEUE_URL'] || channel, message_body: message.to_json, message_attributes: message_attributes)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -37,10 +37,7 @@ module JsonapiPublisher
|
|
37
37
|
if configuration.qservice == 'rmq'
|
38
38
|
@channel ||= connection.create_channel
|
39
39
|
elsif configuration.qservice == 'sqs'
|
40
|
-
@channel ||= connection.
|
41
|
-
attributes: {
|
42
|
-
'FifoQueue' => 'true'
|
43
|
-
})
|
40
|
+
@channel ||= connection.get_queue_url(queue_name: ENV['EVENT_TOPIC'] || 'events')
|
44
41
|
end
|
45
42
|
end
|
46
43
|
|