nsq-ruby 2.1.0 → 2.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec0a2c4e5a3d5760baeed6bd367ee0a862f26867
4
- data.tar.gz: cc3907855851ddfb2aa67ae6b2b061b1e0a88740
3
+ metadata.gz: 229c1d668e9a72a150cf31a0a961ceb167487ff9
4
+ data.tar.gz: fd0037847e57c3d121c8cb3336b89552ab43c6e5
5
5
  SHA512:
6
- metadata.gz: 9f404d3b90fbf3bb069b9ad90739c695f565295724630f78251a835774bcc3c773570130efe220aec7e8e7d5ff48e1880e9a48eb4b4abec4e0fe6d00a1321768
7
- data.tar.gz: 1a6c23c5644bf488964fe405b9f827b61062be8964c566af3e9522c7d56c483f517148958ec50544c922aa6cd42dccb44281bf5241a9ac6fdca0834621390568
6
+ metadata.gz: 9bfde70b0deacc4ca79bad2dff9bf24494e7e713644ab3626f4ccea8b8e26e57863326e66d02d90fbe65c1ab1fa8f54387358a8bfdf30b17776a8f8528ba10d4
7
+ data.tar.gz: c54f95f3fe6840d316f8fda50d4d4560def806ef58dc9f0d7b3fa85a846522ee3253da966b9b0fe2c104d2e52c3eb65566cdfef11b25a61646cee247b02d1066
data/README.md CHANGED
@@ -139,7 +139,12 @@ If its connection to nsqd fails, it will automatically try to reconnect with
139
139
  exponential backoff. Any messages that were sent to `#write` will be queued
140
140
  and transmitted after reconnecting.
141
141
 
142
- **Note** we don't wait for nsqd to acknowledge our writes. As a result, if the
142
+ **Note:** Internally, we use a `SizedQueue` that can hold 10,000 messages. If you're
143
+ producing messages faster than we're able to send them to nsqd or nsqd is
144
+ offline for an extended period and you accumulate 10,000 messages in the queue,
145
+ calls to `#write` will block until there's room in the queue.
146
+
147
+ **Note:** We don't wait for nsqd to acknowledge our writes. As a result, if the
143
148
  connection to nsqd fails, you can lose messages. This is acceptable for our use
144
149
  cases, mostly because we are sending messages to a local nsqd instance and
145
150
  failure is very rare.
@@ -55,7 +55,7 @@ module Nsq
55
55
  end
56
56
 
57
57
  # for outgoing communication
58
- @write_queue = Queue.new
58
+ @write_queue = SizedQueue.new(10000)
59
59
 
60
60
  # For indicating that the connection has died.
61
61
  # We use a Queue so we don't have to poll. Used to communicate across
@@ -1,7 +1,7 @@
1
1
  module Nsq
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 1
4
+ MINOR = 2
5
5
  PATCH = 0
6
6
  BUILD = nil
7
7
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nsq-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wistia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-17 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler