messaging 3.8.0 → 3.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/messaging/adapters/kafka/producer.rb +1 -1
- data/lib/messaging/adapters/kafka.rb +2 -2
- data/lib/messaging/routes.rb +1 -1
- data/lib/messaging/routing.rb +2 -2
- data/lib/messaging/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: 9f5de68db180283bd52af1504a78b1e019a90b306fca3302ce9d6b43b74e26c0
|
4
|
+
data.tar.gz: '01559c65cd0b05a8d1b96c80fd5993520844603abbe86a9908d40bf54031306a'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52c9f50c35e6c38af29f6c3d725ddbb0e2236731e06db249a54ffe357611fecfe39b62411e21fd0776d502d37e3cad5d8c934f44b4e386da376760be05dcac18
|
7
|
+
data.tar.gz: 3868bd007e72cef0150082d7560e67af9967e1f7b6dfcb66b3569f50a6020f3ae3a4cac2eed60f91e1add93197e5314663f245fd2adf3d13f06b7162137f8e67
|
@@ -27,7 +27,7 @@ module Messaging
|
|
27
27
|
|
28
28
|
# Internal: Setup a Ruby-Kafka consumer
|
29
29
|
def create_kafka_consumer(group_id)
|
30
|
-
client.consumer({ group_id: group_id }.merge(Config.kafka.consumer.to_h))
|
30
|
+
client.consumer(**{ group_id: group_id }.merge(Config.kafka.consumer.to_h))
|
31
31
|
end
|
32
32
|
|
33
33
|
private
|
@@ -37,7 +37,7 @@ module Messaging
|
|
37
37
|
# We have a specific logger for Ruby-Kafka as it
|
38
38
|
# is a bit more noisy than we would like.
|
39
39
|
kafka_logger = Messaging.logger.dup.tap { |logger| logger.level = Config.kafka.log_level }
|
40
|
-
|
40
|
+
::Kafka.new(**Config.kafka.client.to_h.merge(client_id: Config.app_name, logger: kafka_logger))
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.register!
|
data/lib/messaging/routes.rb
CHANGED
@@ -16,7 +16,7 @@ module Messaging
|
|
16
16
|
return unless consumers.empty?
|
17
17
|
|
18
18
|
consumer_definitions.each do |name, definition|
|
19
|
-
c = Messaging.consumer_adapter.create_consumer(name, definition.fetch(:options))
|
19
|
+
c = Messaging.consumer_adapter.create_consumer(name, **definition.fetch(:options))
|
20
20
|
definition.fetch(:block)&.call(c)
|
21
21
|
consumers << c
|
22
22
|
end
|
data/lib/messaging/routing.rb
CHANGED
@@ -18,7 +18,7 @@ module Messaging
|
|
18
18
|
definitions << { pattern: pattern, options: options, block: block }
|
19
19
|
end
|
20
20
|
|
21
|
-
def new(*args, &block)
|
21
|
+
def new(*args, **options, &block)
|
22
22
|
instance = allocate
|
23
23
|
|
24
24
|
# Pre-initialize
|
@@ -26,7 +26,7 @@ module Messaging
|
|
26
26
|
instance.on(definition[:pattern], definition[:options], &definition[:block])
|
27
27
|
end
|
28
28
|
|
29
|
-
instance.send(:initialize, *args, &block)
|
29
|
+
instance.send(:initialize, *args, **options, &block)
|
30
30
|
instance
|
31
31
|
end
|
32
32
|
end
|
data/lib/messaging/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bukowskis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|