emque-consuming 1.2.2 → 1.2.3

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: 39838508378e65a825057f22a4e211e2d301d115
4
- data.tar.gz: 054e316c9404a89766e7f0313756f11ff31f3fb1
3
+ metadata.gz: 290b8324e602a34715ea4a9d534aee0e59b47755
4
+ data.tar.gz: e2cbc2b2bd4be95e24a6cacc1adc9a3380617c4d
5
5
  SHA512:
6
- metadata.gz: a266a41d229aaae740a05a5822345b4a3699e47bb7f89f239e927e4cc8612332957d486432393c361b0376f991b698d1e396658c56986664658c1609b47449b4
7
- data.tar.gz: 903ac2a6d0d050709090f548281d398dc801825ddd69ce4eddcf485170af93aeae7bf5a41b78372b3414f21567bd5375ac3f208022b4c455f8bc1e3e102ec70b
6
+ metadata.gz: 7656a70b6ed77107826e82a2d618be3fae2881b36c5f83232e369c757ae82066fa2f021fcca23a7e8b74b30d9f0f8977565b74de9a414ed7510ee3115cc4a710
7
+ data.tar.gz: 563df9c9f55451118c1e29b76110f695e89a27a06d268fe9e9102c3a5b7e3db2059ff8b898edcdff7eab15c1541fa91d5c9a9b6d91cedef86186cd9190e95364
data/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # Emque Consuming CHANGELOG
2
2
 
3
+ - [Add error logging when an exception is thrown.](https://github.com/emque/emque-consuming/pull/65) 1.2.3
3
4
  - [Remove double ack when consuming a message and ending up in an error state. This was causing consumers to die silently.](https://github.com/emque/emque-consuming/pull/59) 1.2.1
4
5
  - [Add in the ability to retry errors and back off with an exponential delay](https://github.com/emque/emque-consuming/pull/55) 1.2.0
5
6
  - [Add in a configuration option to disable auto shutdown on reaching the error limit](https://github.com/emque/emque-consuming/pull/58) 1.1.3
@@ -68,9 +68,11 @@ module Emque
68
68
  )
69
69
  ::Emque::Consuming::Consumer.new.consume(:process, message)
70
70
  channel.ack(delivery_info.delivery_tag)
71
- rescue StandardError => ex
72
- if retryable_errors.any? { |error| ex.class.to_s =~ /#{error}/ }
73
- retry_error(delivery_info, metadata, payload, ex)
71
+ rescue StandardError => exception
72
+ logger.error "#{log_prefix} #{exception.class}: #{exception.message}"
73
+ exception.backtrace.each { |bt| logger.error "#{log_prefix} #{bt}" }
74
+ if retryable_errors.any? { |error| exception.class.to_s =~ /#{error}/ }
75
+ retry_error(delivery_info, metadata, payload, exception)
74
76
  else
75
77
  channel.nack(delivery_info.delivery_tag)
76
78
  end
@@ -55,7 +55,9 @@ module Emque
55
55
  )
56
56
  ::Emque::Consuming::Consumer.new.consume(:process, message)
57
57
  channel.ack(delivery_info.delivery_tag)
58
- rescue StandardError
58
+ rescue StandardError => exception
59
+ logger.error "#{log_prefix} #{exception.class}: #{exception.message}"
60
+ exception.backtrace.each { |bt| logger.error "#{log_prefix} #{bt}" }
59
61
  channel.nack(delivery_info.delivery_tag)
60
62
  end
61
63
  end
@@ -78,7 +78,9 @@ module Emque
78
78
  )
79
79
  ::Emque::Consuming::Consumer.new.consume(:process, message)
80
80
  channel.ack(delivery_info.delivery_tag)
81
- rescue StandardError => ex
81
+ rescue StandardError => exception
82
+ logger.error "#{log_prefix} #{exception.class}: #{exception.message}"
83
+ exception.backtrace.each { |bt| logger.error "#{log_prefix} #{bt}" }
82
84
  if enable_delayed_message
83
85
  begin
84
86
  publish_to_delayed_message(delivery_info, metadata, payload)
@@ -1,5 +1,5 @@
1
1
  module Emque
2
2
  module Consuming
3
- VERSION = "1.2.2"
3
+ VERSION = "1.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emque-consuming
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Williams
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-01-05 00:00:00.000000000 Z
12
+ date: 2017-05-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: celluloid
@@ -290,7 +290,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
290
  version: '0'
291
291
  requirements: []
292
292
  rubyforge_project:
293
- rubygems_version: 2.4.8
293
+ rubygems_version: 2.6.11
294
294
  signing_key:
295
295
  specification_version: 4
296
296
  summary: Microservices framework for Ruby