nats_messaging 1.0.4 → 1.1.0
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/nats_messaging/nats_service.rb +0 -3
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2dc4d9484606ca25c5cf0dd7d7b1e510b07919cea5a27d4db0cad094501f8fd
|
4
|
+
data.tar.gz: eab3e30fff2c202adfecd2e0df849662391b57b3c0128a0462170c55b662f5a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 298ee74aaae3da8fda92e1f680fa12577c2bcb2730f059f054ed9dd64b37cd35efe605d04161f4fa02762fec1538d08e220d8a5b6d53267aa4e8e6e790cc0ebd
|
7
|
+
data.tar.gz: 4f645f2f07be26200e0d018dabc75d073e4f61de5c0723f968d6c52a4739a51630ed1ee2a09e0c1dd0bef780459e0ba7b4eb93f3392d48348ffbf42d5a3e6484
|
@@ -4,7 +4,6 @@ require 'msgpack'
|
|
4
4
|
module NatsMessaging
|
5
5
|
class NatsService
|
6
6
|
def initialize(nats_url, stream_name: nil, subjects: [])
|
7
|
-
# para correr en local usar "nats://localhost:4222" como nats_url
|
8
7
|
@nats = NATS.connect(nats_url)
|
9
8
|
if stream_name
|
10
9
|
@js = @nats.jetstream
|
@@ -107,7 +106,6 @@ module NatsMessaging
|
|
107
106
|
# Create a new subscription
|
108
107
|
puts "NATS: Suscribing to #{subject}"
|
109
108
|
subscription = @nats.subscribe(subject) do |msg|
|
110
|
-
puts "NATS: process reply?"
|
111
109
|
begin
|
112
110
|
unpacked_data = MessagePack.unpack(msg.data) # Deserializar mensaje recibido
|
113
111
|
puts "NATS: Received request on #{subject}: #{unpacked_data}"
|
@@ -129,7 +127,6 @@ module NatsMessaging
|
|
129
127
|
|
130
128
|
# Store the new subscription in the hash
|
131
129
|
@subscriptions[subject] = subscription
|
132
|
-
puts "NATS: Stored subscription for #{subject}: #{@subscriptions[subject].inspect}"
|
133
130
|
puts "NATS: Listening on #{subject} with reply message: #{reply_message}"
|
134
131
|
end
|
135
132
|
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nats_messaging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bea Graboloza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
12
|
-
dependencies:
|
11
|
+
date: 2025-02-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nats-pure
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.4.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.4.0
|
13
27
|
description: A service to send and receive messages on a Rails application using NATS
|
14
28
|
email: beatriz.graboloza@bpo-advisors.net
|
15
29
|
executables: []
|