eventq_aws 1.6.3 → 1.6.4
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 +4 -4
- data/lib/eventq_aws/aws_queue_client.rb +1 -1
- data/lib/eventq_aws/aws_queue_worker.rb +9 -4
- data/lib/eventq_aws/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03fe17fdd0af8f2a61823abb1d83b534059e3287
|
4
|
+
data.tar.gz: 5cd347facb1f62b5e75055fe6e8f2d5588372327
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2478f7e0edfdda90f0b9f0755c06dfa23591675046ef5edc0c3ec164bf7bf71d04429f238bcfac73e9eb51e61fed313d78a05cf26490f4dbbb1adc18e90933f5
|
7
|
+
data.tar.gz: e52a354376e24079d87799ca9c5a9b8b9edf15a6406d0291b8f2b3ce9e92bc90884496bca2638a135a9596588fd93ac61fbd709c6c86589cc437135c523b57b5
|
@@ -194,9 +194,10 @@ module EventQ
|
|
194
194
|
|
195
195
|
message_args = EventQ::MessageArgs.new(message.type, retry_attempts)
|
196
196
|
|
197
|
-
EventQ.log(:
|
197
|
+
EventQ.log(:info, "[#{self.class}] - Message received. Retry Attempts: #{retry_attempts}")
|
198
198
|
|
199
199
|
if(!EventQ::NonceManager.is_allowed?(message.id))
|
200
|
+
EventQ.log(:info, "[#{self.class}] - Duplicate Message received. Dropping message.")
|
200
201
|
client.sqs.delete_message({ queue_url: q, receipt_handle: msg.receipt_handle })
|
201
202
|
return false
|
202
203
|
end
|
@@ -223,7 +224,6 @@ module EventQ
|
|
223
224
|
|
224
225
|
if message_args.abort || error
|
225
226
|
EventQ::NonceManager.failed(message.id)
|
226
|
-
EventQ.log(:info, "[#{self.class}] - Message rejected.")
|
227
227
|
reject_message(queue, client, msg, q, retry_attempts)
|
228
228
|
else
|
229
229
|
EventQ::NonceManager.complete(message.id)
|
@@ -235,15 +235,18 @@ module EventQ
|
|
235
235
|
def reject_message(queue, client, msg, q, retry_attempts)
|
236
236
|
|
237
237
|
if !queue.allow_retry || retry_attempts >= queue.max_retry_attempts
|
238
|
+
|
239
|
+
EventQ.log(:info, "[#{self.class}] - Message rejected removing from queue. Msg: #{serialize_message(msg)}")
|
240
|
+
|
238
241
|
#remove the message from the queue so that it does not get retried again
|
239
242
|
client.sqs.delete_message({ queue_url: q, receipt_handle: msg.receipt_handle })
|
240
243
|
|
241
244
|
if retry_attempts >= queue.max_retry_attempts
|
242
245
|
|
243
|
-
EventQ.log(:info, "[#{self.class}] - Message retry attempt limit exceeded.
|
246
|
+
EventQ.log(:info, "[#{self.class}] - Message retry attempt limit exceeded.")
|
244
247
|
|
245
248
|
if @retry_exceeded_block != nil
|
246
|
-
EventQ.log(:
|
249
|
+
EventQ.log(:info, "[#{self.class}] - Executing retry exceeded block.")
|
247
250
|
@retry_exceeded_block.call(message)
|
248
251
|
end
|
249
252
|
|
@@ -253,6 +256,8 @@ module EventQ
|
|
253
256
|
|
254
257
|
retry_attempts += 1
|
255
258
|
|
259
|
+
EventQ.log(:info, "[#{self.class}] - Message rejected requesting retry. Attempts: #{retry_attempts}")
|
260
|
+
|
256
261
|
if queue.allow_retry_back_off == true
|
257
262
|
EventQ.log(:debug, "[#{self.class}] - Calculating message back off retry delay. Attempts: #{retry_attempts} * Delay: #{queue.retry_delay}")
|
258
263
|
visibility_timeout = (queue.retry_delay * retry_attempts) / 1000
|
data/lib/eventq_aws/version.rb
CHANGED