bbk-amqp 1.0.0.79546 → 1.0.0.82255
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/bbk/amqp/consumer.rb +2 -1
- data/lib/bbk/amqp/publisher.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d96acd31582f6d08bb3ead76fa6cef86927cc2f6788bcc6f9bb4dd172d4734a6
|
4
|
+
data.tar.gz: 6deb1160d3c82a8007c10853880b59b0f3c785743b431388cefedb0a2865bd6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f6c7740a23bff9fd1ea7d4305eeae509ecece8383851bf79b9e8f1314e67bfe8041b411e51d535195c15311b7b4e9e24cceabbf57c11a6a744f635373abccc1
|
7
|
+
data.tar.gz: 18c8815fb960e9eae38f9b9cc99e099e27adad437476feb5555bcf55e5755a210e77454b34cb692119fecc7f2240af2427217bbbaa71876a651882a7e9641886
|
data/Gemfile.lock
CHANGED
data/lib/bbk/amqp/consumer.rb
CHANGED
data/lib/bbk/amqp/publisher.rb
CHANGED
@@ -8,7 +8,7 @@ module BBK
|
|
8
8
|
# Publisher send amqp messages
|
9
9
|
class Publisher
|
10
10
|
|
11
|
-
HEADER_PROP_FIELDS = %i[
|
11
|
+
HEADER_PROP_FIELDS = %i[message_id reply_to correlation_id].freeze
|
12
12
|
PROTOCOLS = %w[mq amqp amqps].freeze
|
13
13
|
|
14
14
|
attr_reader :connection, :domains, :logger, :channel, :ack_map, :sended_messages, :channel
|
@@ -72,9 +72,14 @@ module BBK
|
|
72
72
|
mandatory: true,
|
73
73
|
routing_key: routing_key,
|
74
74
|
headers: message.headers,
|
75
|
-
user_id: client_name,
|
75
|
+
# user_id: client_name,
|
76
76
|
**message.headers.select {|k| HEADER_PROP_FIELDS.include? k }.compact
|
77
77
|
}.merge(options).symbolize_keys
|
78
|
+
properties[:user_id] = if (user_id = message.headers[:user_id]).present?
|
79
|
+
user_id
|
80
|
+
else
|
81
|
+
client_name
|
82
|
+
end
|
78
83
|
send_message(exchange, routing_key, message.payload, properties)
|
79
84
|
end
|
80
85
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bbk-amqp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.82255
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samoylenko Yuri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|