ears 0.7.1 → 0.7.2

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
  SHA256:
3
- metadata.gz: 14a4861d19cb40a286132903f840c44a2ca5c499a6548904e9b236adbb274a2b
4
- data.tar.gz: 8dc749ba6583db68c5b69e24f4847b8bfbffe7844c40f9f97e485160569aaecd
3
+ metadata.gz: 7bc6c28c4597c7c985f8482edb10413d5877d1ec9bf1b937ccce30ffc7e78ea9
4
+ data.tar.gz: c6b55a0e1f0477970a7e451df4da4dc20ea35440c00cb4439d26f40949b9890c
5
5
  SHA512:
6
- metadata.gz: d6a040d48cf13b7fa5895ff6b36af6d28ebe51d87582dfad7358fb242c6d808cea7892b359df127e2e93764d8674b7a28bd35024e59fa3f61ea062fb20e379ac
7
- data.tar.gz: cc5857eeb86f2092e23076a145cb153c45e51da4501c9ce4d7f219e0b71fce46b97e55340331b411bab9fa3eccfdef12c8d8dabefdbc09611611860f3ea6fd36
6
+ metadata.gz: 7171678d307d67b703d7b63f2b338779bfd2d55ad9f3887e364d799043b811a6d3b97aa380b4a3f585fdb0cd7b97a3e7fe34cc764ed0acdd9cd9d7aac92d7fba
7
+ data.tar.gz: 27b9d05cc0807766b98ff46a5b0dbeeb357df7a1be60997706c4dc3a40b3002dd8ea8ae941398ef5238e6d6d0eb44baaa40b4b456e208de0f1bd9f511d1aef28
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.2 (2022-02-24)
4
+
5
+ - change retry middleware to gracefully handle messages that do not have a header in their metadata
6
+
3
7
  ## 0.7.1 (2021-12-21)
4
8
 
5
9
  - explicitly report Appsignal errors in middleware to make it more reliable
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ears (0.7.1)
4
+ ears (0.7.2)
5
5
  bunny
6
6
  multi_json
7
7
 
data/README.md CHANGED
@@ -165,7 +165,7 @@ my_queue =
165
165
  queue('my_queue', durable: true, retry_queue: true, retry_delay: 5000)
166
166
  ```
167
167
 
168
- This will automatically create a queue named `my_queue.retry` and use the arguments `x-dead-letter-exchange` and `x-dead-letter-routing-key` to route rejected messages to it. When routed to the retry queue, messages will wait there for the number of milliseconds specified in `retry_delay`, after which they will be redelivered to the original queue.
168
+ This will automatically create a queue named `my_queue.retry` and use the arguments `x-dead-letter-exchange` and `x-dead-letter-routing-key` to route rejected messages to it. When routed to the retry queue, messages will wait there for the number of milliseconds specified in `retry_delay`, after which they will be redelivered to the original queue. **Note that this will not automatically catch unhandled errors. You still have to catch any errors yourself and reject your message manually for the retry mechanism to work.**
169
169
 
170
170
  This will happen indefinitely, so if you want to bail out of this cycle at some point, it is best to use the `error_queue` option to create an error queue and then use the `MaxRetries` middleware to route messages to this error queue after a certain amount of retries.
171
171
 
@@ -30,6 +30,8 @@ module Ears
30
30
  end
31
31
 
32
32
  def retries_exceeded?(metadata)
33
+ return false if metadata.headers.nil?
34
+
33
35
  rejected_deaths =
34
36
  metadata
35
37
  .headers
data/lib/ears/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ears
2
- VERSION = '0.7.1'
2
+ VERSION = '0.7.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ears
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Mainz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-21 00:00:00.000000000 Z
11
+ date: 2022-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny