nsq-ruby 2.3.1 → 2.4.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 +5 -5
- data/README.md +2 -3
- data/VERSION +1 -0
- data/lib/nsq/consumer.rb +8 -4
- data/lib/nsq/discovery.rb +1 -1
- data/lib/version.rb +1 -5
- metadata +6 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 28f6367f843e0cf5a7c0728e4304099ad9847600a670e334c4915fc9e58a6dcc
|
4
|
+
data.tar.gz: ee967b3c8b66483577373a97a2b563002ab95b3dd8d461f891a4a2b03e1823b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dff4ecce775e6a7081e6b726dbfc49e4f501a3abb65c34fadaeb585629db0daef4562937f5b1b2a3ccee1cd31e66681978e4e78efe9b1ff55f271003c3f4bf3e
|
7
|
+
data.tar.gz: 6c7dce7efa81c23dc7a19575cfe8c2badda252ff7596e0b6c9d378b1068b177378dae2054f099b25121b5bc6bbbc00dc0ef3e0c3d2df555e8cdf9dc9ce8d88c7
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ nsq-ruby is a simple NSQ client library written in Ruby.
|
|
17
17
|
```Ruby
|
18
18
|
require 'nsq'
|
19
19
|
producer = Nsq::Producer.new(
|
20
|
-
nsqd: '127.0.0.1:4150',
|
20
|
+
nsqd: '127.0.0.1:4150', # or ['127.0.0.1:4150']
|
21
21
|
topic: 'some-topic'
|
22
22
|
)
|
23
23
|
|
@@ -77,7 +77,7 @@ For example, if you'd like to publish messages to a single nsqd.
|
|
77
77
|
|
78
78
|
```Ruby
|
79
79
|
producer = Nsq::Producer.new(
|
80
|
-
nsqd: '6.7.8.9:4150',
|
80
|
+
nsqd: '6.7.8.9:4150', # or ['6.7.8.9:4150']
|
81
81
|
topic: 'topic-of-great-esteem'
|
82
82
|
)
|
83
83
|
```
|
@@ -418,4 +418,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
418
418
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
419
419
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
420
420
|
SOFTWARE.
|
421
|
-
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.1
|
data/lib/nsq/consumer.rb
CHANGED
@@ -27,7 +27,7 @@ module Nsq
|
|
27
27
|
|
28
28
|
# This is where we keep a record of our active nsqd connections
|
29
29
|
# The key is a string with the host and port of the instance (e.g.
|
30
|
-
# '127.0.0.1:4150') and the
|
30
|
+
# '127.0.0.1:4150') and the value is the Connection instance.
|
31
31
|
@connections = {}
|
32
32
|
|
33
33
|
if !@nsqlookupds.empty?
|
@@ -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
metadata
CHANGED
@@ -1,43 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nsq-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wistia
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2018-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: jeweler
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '2.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '2.0'
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
14
|
name: nsq-cluster
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,6 +48,7 @@ extra_rdoc_files:
|
|
76
48
|
files:
|
77
49
|
- LICENSE.txt
|
78
50
|
- README.md
|
51
|
+
- VERSION
|
79
52
|
- lib/nsq.rb
|
80
53
|
- lib/nsq/client_base.rb
|
81
54
|
- lib/nsq/connection.rb
|
@@ -93,7 +66,7 @@ homepage: http://github.com/wistia/nsq-ruby
|
|
93
66
|
licenses:
|
94
67
|
- MIT
|
95
68
|
metadata: {}
|
96
|
-
post_install_message:
|
69
|
+
post_install_message:
|
97
70
|
rdoc_options: []
|
98
71
|
require_paths:
|
99
72
|
- lib
|
@@ -108,9 +81,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
81
|
- !ruby/object:Gem::Version
|
109
82
|
version: '0'
|
110
83
|
requirements: []
|
111
|
-
|
112
|
-
|
113
|
-
signing_key:
|
84
|
+
rubygems_version: 3.1.6
|
85
|
+
signing_key:
|
114
86
|
specification_version: 4
|
115
87
|
summary: Ruby client library for NSQ
|
116
88
|
test_files: []
|