nsq-ruby-fastly 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +10 -1
- data/lib/nsq/consumer.rb +7 -3
- data/lib/nsq/discovery.rb +1 -1
- data/lib/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: b4ea6714940846f466b7cced4d36dfc745146a0d274ee4dfd5ae48f90c3320e5
|
4
|
+
data.tar.gz: 41342d811da1aee48b4aee5307d31924533ca38306aca76543fe290d3674a55f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cc45e1559ca14d04a27b4cfc8c5852b2e0b2c56d1f66f4025a0500e1fa94bbfe4a9224e0fe01bd86bcc0698ebc509561da54c963367774532b385c99244ed7e
|
7
|
+
data.tar.gz: 6772e90a172bb4acaffb8f569768d5a9f5541888523c89fbd92228ccc42872fcb1ccc53ec4ba408eb9e110fbaabdac24ad97da7ffbad31ef5a79dda1ba57fb1c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# nsq-ruby
|
2
2
|
|
3
|
+
**This is a fork of [wistia/nsq-ruby](https://github.com/wistia/nsq-ruby).**
|
4
|
+
|
3
5
|
nsq-ruby is a simple NSQ client library written in Ruby.
|
4
6
|
|
5
7
|
- The code is straightforward.
|
@@ -7,8 +9,15 @@ nsq-ruby is a simple NSQ client library written in Ruby.
|
|
7
9
|
- It's well tested.
|
8
10
|
- It's being used in production and has processed billions of messages.
|
9
11
|
|
10
|
-
[![Build Status](https://travis-ci.
|
12
|
+
[![Build Status](https://travis-ci.com/fastly/nsq-ruby.svg?branch=main)](https://travis-ci.com/fastly/nsq-ruby)
|
13
|
+
|
14
|
+
## Gem installation
|
15
|
+
|
16
|
+
Gemfile:
|
11
17
|
|
18
|
+
```
|
19
|
+
gem 'nsq-ruby-fastly', require: 'nsq-ruby'
|
20
|
+
```
|
12
21
|
|
13
22
|
## Quick start
|
14
23
|
|
data/lib/nsq/consumer.rb
CHANGED
@@ -36,10 +36,14 @@ module Nsq
|
|
36
36
|
topic: @topic,
|
37
37
|
interval: @discovery_interval
|
38
38
|
)
|
39
|
+
|
40
|
+
elsif opts[:nsqd]
|
41
|
+
nsqds = [opts[:nsqd]].flatten
|
42
|
+
max_per_conn = max_in_flight_per_connection(nsqds.size)
|
43
|
+
nsqds.each{|d| add_connection(d, max_in_flight: max_per_conn)}
|
44
|
+
|
39
45
|
else
|
40
|
-
|
41
|
-
# in this case let's connect to an nsqd instance directly
|
42
|
-
add_connection(opts[:nsqd] || '127.0.0.1:4150', max_in_flight: @max_in_flight)
|
46
|
+
add_connection('127.0.0.1:4150', max_in_flight: @max_in_flight)
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
data/lib/nsq/discovery.rb
CHANGED
data/lib/version.rb
CHANGED