leopard 0.3.0 → 0.3.1
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/.release-please-manifest.json +1 -1
- data/.version.txt +1 -1
- data/CHANGELOG.md +12 -0
- data/lib/leopard/nats_jetstream_consumer.rb +9 -15
- data/lib/leopard/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: 79ba04039c1795930b780fe4d958bc4cac050d641f079222f6c07737fd3a9f67
|
|
4
|
+
data.tar.gz: 2327bd745905c55a56c6ee7b1e6f5a00f9f2c69a86b63402d50dac5b1f09d3b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e3fa984d0d8742e780ed80619beb2333f7caa41f7435459c3d34d4cd5f883427c0f791e8e35547494f2c421cee65346b9119f30075800e52effbff1aff5bbf9f
|
|
7
|
+
data.tar.gz: c7c4332092d9ef57586b52f273518e4b40444e6a9b4fa8804ad0073a89f6fc35900c273d79a62efe283f6650c46bf50ddb25ab1ace09f2954de64cfd70a9690d
|
data/.version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.1](https://github.com/rubyists/leopard/compare/v0.3.0...v0.3.1) (2026-10-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Add empty line ([aedb08d](https://github.com/rubyists/leopard/commit/aedb08d7760beea26cd237c646a0860b04c25a68))
|
|
9
|
+
* enable jetstream endpoint to resolve stream from subject and add error logs ([1cdeaf6](https://github.com/rubyists/leopard/commit/1cdeaf699c15f6fffdd5de70cdf243325c5a0431))
|
|
10
|
+
* Enable jetstream endpoint to resolve stream from subject and add error logs ([923dda5](https://github.com/rubyists/leopard/commit/923dda50850698d4bc2f358c49ade4f15d0d104b))
|
|
11
|
+
* Pass endpoint name when durable is not available ([06e88c7](https://github.com/rubyists/leopard/commit/06e88c7a520c0f6dfec0f88110a039bea9b4c56f))
|
|
12
|
+
* Remove ensure_consumer and fallback on pull_subscrbe to resolve stream ([909230c](https://github.com/rubyists/leopard/commit/909230ca55b85b42fda3703aa06cb00e4726b089))
|
|
13
|
+
* Update integration test to reflect reliance on pull_subscribe ([b39fe75](https://github.com/rubyists/leopard/commit/b39fe75c9142dbdb2358e01d5ba6d96ec777c938))
|
|
14
|
+
|
|
3
15
|
## [0.3.0](https://github.com/rubyists/leopard/compare/v0.2.11...v0.3.0) (2026-09-18)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -69,33 +69,27 @@ module Rubyists
|
|
|
69
69
|
subscription = build_subscription(endpoint)
|
|
70
70
|
subscriptions << subscription
|
|
71
71
|
threads << @thread_factory.new { consume_endpoint(subscription, endpoint) }
|
|
72
|
+
rescue StandardError => e
|
|
73
|
+
@logger.error "JetStream endpoint #{endpoint.name} failed to start: ", e
|
|
74
|
+
raise
|
|
72
75
|
end
|
|
73
76
|
|
|
74
|
-
#
|
|
77
|
+
# Creates a pull subscription for the endpoint's durable consumer.
|
|
78
|
+
#
|
|
79
|
+
# No stream is passed, so nats-pure resolves the stream from the subject and adds the durable consumer
|
|
80
|
+
# (using {#consumer_config}) when it does not already exist.
|
|
75
81
|
#
|
|
76
82
|
# @param endpoint [NatsJetstreamEndpoint] The endpoint configuration to subscribe to.
|
|
77
83
|
#
|
|
78
84
|
# @return [Object] The JetStream pull subscription.
|
|
79
85
|
def build_subscription(endpoint)
|
|
80
|
-
ensure_consumer(endpoint)
|
|
81
86
|
@jetstream.pull_subscribe(
|
|
82
87
|
endpoint.subject,
|
|
83
|
-
endpoint.durable,
|
|
84
|
-
|
|
88
|
+
endpoint.durable || endpoint.name,
|
|
89
|
+
config: consumer_config(endpoint),
|
|
85
90
|
)
|
|
86
91
|
end
|
|
87
92
|
|
|
88
|
-
# Verifies that the durable consumer exists, creating it when missing.
|
|
89
|
-
#
|
|
90
|
-
# @param endpoint [NatsJetstreamEndpoint] The endpoint configuration to ensure.
|
|
91
|
-
#
|
|
92
|
-
# @return [Object] Consumer metadata from `consumer_info` or `add_consumer`.
|
|
93
|
-
def ensure_consumer(endpoint)
|
|
94
|
-
@jetstream.consumer_info(endpoint.stream, endpoint.durable)
|
|
95
|
-
rescue NATS::JetStream::Error::NotFound
|
|
96
|
-
@jetstream.add_consumer(endpoint.stream, consumer_config(endpoint))
|
|
97
|
-
end
|
|
98
|
-
|
|
99
93
|
# Builds the JetStream consumer configuration for an endpoint.
|
|
100
94
|
#
|
|
101
95
|
# @param endpoint [NatsJetstreamEndpoint] The endpoint configuration to translate.
|
data/lib/leopard/version.rb
CHANGED