pebbles-river 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c514b0f819ee4aa389d5abaca35f3dcdc8fecd5b
4
- data.tar.gz: dcbbe1d18db737bd37e88a919cf5597d7f671f92
3
+ metadata.gz: 3f7948d260e40b0cecffab90006e922379efd38f
4
+ data.tar.gz: 4d56560952e7e40282b4c94b8fbd4f9efa77cd30
5
5
  SHA512:
6
- metadata.gz: 7880c624a3e71b2cf73f17d13f8eb9b8be74adc5dbea419302c3ede4119892848643c72b09e217099128c7442aa0a132c1529923f9f782451bee2b01df925221
7
- data.tar.gz: 1d5c924d2fb50c934b656b493e6db0cdc1a126ab043e9b8aced0560713562fb09d94caaec151bd4bf8ccf326e17062ead056d3b00f2cb631be7feb572d615a81
6
+ metadata.gz: a5345293b105990aa43b48d47124415770ddef300b839a90c32617b0141650d9282d09b1e0319e8b009974115fe33a85c8c6fb28c61bec9e338b70db02ed60e9
7
+ data.tar.gz: ed800b294e48cf4818a506fb166cba9753fd379aeedf188bea7311afb3cfd192d401ee1e187ad437ab419cb3536023459718b7bc20ebb63a3009e500afea7844
@@ -1,5 +1,5 @@
1
1
  module Pebbles
2
2
  module River
3
- VERSION = '0.3.7'
3
+ VERSION = '0.3.8'
4
4
  end
5
5
  end
@@ -136,6 +136,11 @@ module Pebbles
136
136
  def process_message(delivery_info, properties, content)
137
137
  begin
138
138
  message = Message.new(content, delivery_info, queue)
139
+ rescue InvalidPayloadError => e
140
+ if @logger
141
+ @logger.error("Invalid payload, ignoring message: #{e}")
142
+ reject(delivery_info, requeue: false)
143
+ end
139
144
  rescue => e
140
145
  ignore_exceptions do
141
146
  reject(delivery_info)
@@ -166,11 +171,12 @@ module Pebbles
166
171
  end
167
172
  end
168
173
 
169
- def reject(delivery_info)
170
- # Normally requeue, except if we are dead-lettering to another queue, where
171
- # requeue = false means to bounce it to DLX.
172
- requeue = !@dead_lettered
173
-
174
+ def reject(delivery_info, requeue: nil)
175
+ if requeue.nil?
176
+ # Normally requeue, except if we are dead-lettering to another queue, where
177
+ # requeue = false means to bounce it to DLX.
178
+ requeue = !@dead_lettered
179
+ end
174
180
  queue.channel.reject(delivery_info.delivery_tag.to_i, requeue)
175
181
  end
176
182
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pebbles-river
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Staubo
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-30 00:00:00.000000000 Z
12
+ date: 2017-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: pebblebed