bbk-amqp 1.1.1.273342 → 1.1.2.334069
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -17
- data/lib/bbk/amqp/message.rb +6 -1
- data/lib/bbk/amqp/publisher.rb +2 -1
- data/lib/bbk/amqp/version.rb +1 -1
- 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: c89b2a8645a01693334105b874e03019e37e3b2705db0fce6ae37190accc9dcc
|
|
4
|
+
data.tar.gz: 17bd0d7d1c3e5d856f5741eed1d54c396bc0a68d4a18919f19307de9d5fcfc92
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8f1d0ebe2357c59361512d4cef837f0596ee0493a6452928edab033e87cd0c1080a1f729e80323d545a096a300040c5829bd0dc161e844aa1acc05c2c562b8f
|
|
7
|
+
data.tar.gz: ece706eb26b110d8b136cbedcb4f2d9d5641141f01fecd4551cf01ba78de6fa96667eecb1a5fc40b5072843d4ff6a50127a6b103b8adec7e09b39f837be6e23a
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
bbk-amqp (1.1.
|
|
4
|
+
bbk-amqp (1.1.2.334069)
|
|
5
5
|
activesupport (>= 6.0)
|
|
6
6
|
bbk-app (>= 1.1.1.273338)
|
|
7
7
|
bbk-utils (> 1.0.1)
|
|
@@ -11,7 +11,7 @@ PATH
|
|
|
11
11
|
GEM
|
|
12
12
|
remote: https://rubygems.org/
|
|
13
13
|
specs:
|
|
14
|
-
activesupport (7.1.
|
|
14
|
+
activesupport (7.1.6)
|
|
15
15
|
base64
|
|
16
16
|
benchmark (>= 0.3)
|
|
17
17
|
bigdecimal
|
|
@@ -33,18 +33,19 @@ GEM
|
|
|
33
33
|
descendants_tracker (~> 0.0.4)
|
|
34
34
|
ice_nine (~> 0.11.0)
|
|
35
35
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
36
|
-
base64 (0.
|
|
37
|
-
bbk-app (1.1.
|
|
36
|
+
base64 (0.3.0)
|
|
37
|
+
bbk-app (1.1.3.334031)
|
|
38
38
|
activesupport (>= 6.0)
|
|
39
39
|
bbk-utils (> 1.0.1)
|
|
40
40
|
oj
|
|
41
41
|
timeouter
|
|
42
|
-
bbk-utils (1.1.
|
|
42
|
+
bbk-utils (1.1.2.304819)
|
|
43
43
|
activesupport (>= 7.0)
|
|
44
44
|
russian
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
securerandom (~> 0.3.2)
|
|
46
|
+
benchmark (0.5.0)
|
|
47
|
+
bigdecimal (3.3.1)
|
|
48
|
+
bunny (2.23.0)
|
|
48
49
|
amq-protocol (~> 2.3, >= 2.3.1)
|
|
49
50
|
sorted_set (~> 1, >= 1.0.2)
|
|
50
51
|
bunny-mock (1.7.0)
|
|
@@ -52,13 +53,13 @@ GEM
|
|
|
52
53
|
byebug (11.1.3)
|
|
53
54
|
coercible (1.0.0)
|
|
54
55
|
descendants_tracker (~> 0.0.1)
|
|
55
|
-
concurrent-ruby (1.3.
|
|
56
|
-
connection_pool (2.4
|
|
56
|
+
concurrent-ruby (1.3.5)
|
|
57
|
+
connection_pool (2.5.4)
|
|
57
58
|
descendants_tracker (0.0.4)
|
|
58
59
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
59
60
|
diff-lcs (1.5.1)
|
|
60
61
|
docile (1.4.0)
|
|
61
|
-
drb (2.2.
|
|
62
|
+
drb (2.2.3)
|
|
62
63
|
equalizer (0.0.11)
|
|
63
64
|
erubis (2.7.0)
|
|
64
65
|
flay (2.12.1)
|
|
@@ -70,19 +71,19 @@ GEM
|
|
|
70
71
|
path_expander (~> 1.0)
|
|
71
72
|
ruby_parser (~> 3.1, > 3.1.0)
|
|
72
73
|
sexp_processor (~> 4.8)
|
|
73
|
-
i18n (1.14.
|
|
74
|
+
i18n (1.14.7)
|
|
74
75
|
concurrent-ruby (~> 1.0)
|
|
75
76
|
ice_nine (0.11.2)
|
|
76
77
|
kwalify (0.7.2)
|
|
77
78
|
launchy (2.5.0)
|
|
78
79
|
addressable (~> 2.7)
|
|
79
|
-
logger (1.
|
|
80
|
-
minitest (5.
|
|
81
|
-
mutex_m (0.
|
|
82
|
-
oj (3.16.
|
|
80
|
+
logger (1.7.0)
|
|
81
|
+
minitest (5.26.0)
|
|
82
|
+
mutex_m (0.3.0)
|
|
83
|
+
oj (3.16.11)
|
|
83
84
|
bigdecimal (>= 3.0)
|
|
84
85
|
ostruct (>= 0.2)
|
|
85
|
-
ostruct (0.6.
|
|
86
|
+
ostruct (0.6.3)
|
|
86
87
|
parallel (1.26.3)
|
|
87
88
|
parser (3.0.3.2)
|
|
88
89
|
ast (~> 2.4.1)
|
data/lib/bbk/amqp/message.rb
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
|
|
2
3
|
require 'bbk/app/dispatcher/message'
|
|
3
4
|
|
|
4
5
|
module BBK
|
|
@@ -27,7 +28,7 @@ module BBK
|
|
|
27
28
|
end
|
|
28
29
|
|
|
29
30
|
def reply_to
|
|
30
|
-
headers[:reply_to]
|
|
31
|
+
headers[:reply_to] || user_id
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
def user_id
|
|
@@ -42,6 +43,10 @@ module BBK
|
|
|
42
43
|
consumer&.protocols&.first
|
|
43
44
|
end
|
|
44
45
|
|
|
46
|
+
def inspect # :nodoc:
|
|
47
|
+
"#<#{self.class.name} @consumer=#{consumer.class.name}, @delivery_info=#{delivery_info.except(:message_consumer).inspect}, @headers=#{headers.inspect}, @properties=#{@properties.inspect}>"
|
|
48
|
+
end
|
|
49
|
+
|
|
45
50
|
end
|
|
46
51
|
end
|
|
47
52
|
end
|
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[message_id reply_to correlation_id].freeze
|
|
11
|
+
HEADER_PROP_FIELDS = %i[message_id reply_to correlation_id, timestamp].freeze
|
|
12
12
|
PROTOCOLS = %w[mq amqp amqps].freeze
|
|
13
13
|
|
|
14
14
|
class PublishedMessage
|
|
@@ -79,6 +79,7 @@ module BBK
|
|
|
79
79
|
# @param exchange [String] exchange for sending message
|
|
80
80
|
# @param options [Hash] message properties
|
|
81
81
|
def publish_message(routing_key, message, exchange:, options: {})
|
|
82
|
+
message.headers[:timestamp] ||= Time.now.to_i
|
|
82
83
|
logger.debug "Try publish message #{message.headers.inspect}"
|
|
83
84
|
properties = {
|
|
84
85
|
persistent: true,
|
data/lib/bbk/amqp/version.rb
CHANGED
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.1.
|
|
4
|
+
version: 1.1.2.334069
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samoylenko Yuri
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-10-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|