jetstream_bridge 3.0.1 → 3.0.2
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/lib/jetstream_bridge/consumer/inbox/inbox_message.rb +4 -4
- data/lib/jetstream_bridge/core/duration.rb +2 -2
- data/lib/jetstream_bridge/inbox_event.rb +1 -1
- data/lib/jetstream_bridge/models/subject.rb +3 -2
- data/lib/jetstream_bridge/outbox_event.rb +1 -1
- data/lib/jetstream_bridge/publisher/publisher.rb +2 -2
- data/lib/jetstream_bridge/topology/overlap_guard.rb +1 -1
- data/lib/jetstream_bridge/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 01cdd0f6836d3c3ed272e69b801c9d583240774cb1dc76a7d4792fb3047c316d
|
|
4
|
+
data.tar.gz: a0e5feff3f131ab762607027138816ae7805aea7b4642e6247f86616803d8f8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c54289ab32d5798edff32bbfcb8a4e0758e8d251b05bf0ecfdc258c8a9fa4da77ea7c55608dd177507170a6434307b71b27c7b4cbcf0082667c431654669dfc
|
|
7
|
+
data.tar.gz: c8e60865e3b3082d5c199aa75d0411415cddbeae4a74d254e51be24bc223c8a9ebf9461e0d0e1ce8be7e73269783dadc3f16b23ecadb2fb571c8923ae8ace4c3
|
|
@@ -68,12 +68,12 @@ module JetstreamBridge
|
|
|
68
68
|
.new(deliveries, seq, @consumer, stream)
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
def ack(
|
|
72
|
-
msg.ack(
|
|
71
|
+
def ack(*, **)
|
|
72
|
+
msg.ack(*, **) if msg.respond_to?(:ack)
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
-
def nak(
|
|
76
|
-
msg.nak(
|
|
75
|
+
def nak(*, **)
|
|
76
|
+
msg.nak(*, **) if msg.respond_to?(:nak)
|
|
77
77
|
end
|
|
78
78
|
end
|
|
79
79
|
end
|
|
@@ -37,8 +37,8 @@ module JetstreamBridge
|
|
|
37
37
|
'd' => 86_400_000 # days to ms
|
|
38
38
|
}.freeze
|
|
39
39
|
|
|
40
|
-
NUMBER_RE = /\A\d[\d_]*\z
|
|
41
|
-
TOKEN_RE = /\A(\d[\d_]*(?:\.\d+)?)\s*(ns|us|µs|ms|s|m|h|d)\z/i
|
|
40
|
+
NUMBER_RE = /\A\d[\d_]*\z/
|
|
41
|
+
TOKEN_RE = /\A(\d[\d_]*(?:\.\d+)?)\s*(ns|us|µs|ms|s|m|h|d)\z/i
|
|
42
42
|
|
|
43
43
|
module_function
|
|
44
44
|
|
|
@@ -99,7 +99,7 @@ module JetstreamBridge
|
|
|
99
99
|
# Shim: loud failure if AR isn't present but someone calls the model.
|
|
100
100
|
class InboxEvent
|
|
101
101
|
class << self
|
|
102
|
-
def method_missing(method_name, *_args, &
|
|
102
|
+
def method_missing(method_name, *_args, &)
|
|
103
103
|
raise_missing_ar!('Inbox', method_name)
|
|
104
104
|
end
|
|
105
105
|
|
|
@@ -7,7 +7,7 @@ module JetstreamBridge
|
|
|
7
7
|
WILDCARD_SINGLE = '*'
|
|
8
8
|
WILDCARD_MULTI = '>'
|
|
9
9
|
SEPARATOR = '.'
|
|
10
|
-
INVALID_CHARS = /[#{Regexp.escape(WILDCARD_SINGLE + WILDCARD_MULTI + SEPARATOR)}]
|
|
10
|
+
INVALID_CHARS = /[#{Regexp.escape(WILDCARD_SINGLE + WILDCARD_MULTI + SEPARATOR)}]/
|
|
11
11
|
|
|
12
12
|
attr_reader :value, :tokens
|
|
13
13
|
|
|
@@ -66,8 +66,9 @@ module JetstreamBridge
|
|
|
66
66
|
def self.validate_component!(value, name)
|
|
67
67
|
str = value.to_s
|
|
68
68
|
if str.match?(INVALID_CHARS)
|
|
69
|
+
wildcards = "#{SEPARATOR}, #{WILDCARD_SINGLE}, #{WILDCARD_MULTI}"
|
|
69
70
|
raise ArgumentError,
|
|
70
|
-
"#{name} cannot contain NATS wildcards (#{
|
|
71
|
+
"#{name} cannot contain NATS wildcards (#{wildcards}): #{value.inspect}"
|
|
71
72
|
end
|
|
72
73
|
raise ArgumentError, "#{name} cannot be empty" if str.strip.empty?
|
|
73
74
|
|
|
@@ -109,7 +109,7 @@ module JetstreamBridge
|
|
|
109
109
|
# Shim: loud failure if AR isn't present but someone calls the model.
|
|
110
110
|
class OutboxEvent
|
|
111
111
|
class << self
|
|
112
|
-
def method_missing(method_name, *_args, &
|
|
112
|
+
def method_missing(method_name, *_args, &)
|
|
113
113
|
raise_missing_ar!('Outbox', method_name)
|
|
114
114
|
end
|
|
115
115
|
|
|
@@ -96,8 +96,8 @@ module JetstreamBridge
|
|
|
96
96
|
# ---- /Outbox path ----
|
|
97
97
|
|
|
98
98
|
# Retry using strategy pattern
|
|
99
|
-
def with_retries(&
|
|
100
|
-
@retry_strategy.execute(context: 'Publisher', &
|
|
99
|
+
def with_retries(&)
|
|
100
|
+
@retry_strategy.execute(context: 'Publisher', &)
|
|
101
101
|
rescue RetryStrategy::RetryExhausted => e
|
|
102
102
|
log_error(false, e)
|
|
103
103
|
end
|
|
@@ -87,7 +87,7 @@ module JetstreamBridge
|
|
|
87
87
|
end
|
|
88
88
|
|
|
89
89
|
def conflict_message(target, conflicts)
|
|
90
|
-
msg =
|
|
90
|
+
msg = "Overlapping subjects for stream #{target}:\n"
|
|
91
91
|
conflicts.each do |c|
|
|
92
92
|
msg << "- Conflicts with '#{c[:name]}' on:\n"
|
|
93
93
|
c[:pairs].each { |(a, b)| msg << " • #{a} × #{b}\n" }
|