lib/google_pubsub_enhancer/middleware/publisher.rb in google-pubsub-enhancer-0.4.2 vs lib/google_pubsub_enhancer/middleware/publisher.rb in google-pubsub-enhancer-0.5.0
- old
+ new
@@ -14,9 +14,12 @@
@google_cloud_pubsub.publish(@full_topic_name) do |publisher|
[*env[@messages_key]].each do |m|
publisher.publish(m)
end
end
+ rescue => ex
+ @logger.error("Retry publisher: #{ex}")
+ retry
@app.call(env)
end
end