waterdrop 0.1.9 → 0.1.10

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: afd61e0c7e80a6ccd14002340ca460ca051f835e
4
- data.tar.gz: 80072934389308b27aa255a7e8e9b223b906d10e
3
+ metadata.gz: e5395d0cffc98192411f2ee5448353e843eff99f
4
+ data.tar.gz: 97314df129d5eaaf8f530801ba318cfaad3bfb3f
5
5
  SHA512:
6
- metadata.gz: e4653e4edb72c79ac015451e7fa9c5b62232262e63cd76420bb8aa7b02b3d64df87098d81a73b80867511b898e513ce9c88f28e132238d1cf54109b4dc598332
7
- data.tar.gz: 17c30dc90a1bd130245ce9df5f586d97ff4fa70a007ef1f7ff21e5e55572a4eab94fcf8dc76c42d44f44b8cc7c2eecca6bb7085c7b3773a2f18d1bc2e5d9709d
6
+ metadata.gz: 61438c41138d8839c8c62b82ebeef3a1853d04c0721b7eea8fb49260ea029c4ad2350ed1087796726b2531e13657720e5496c928bfe203a34a0fe543e5630964
7
+ data.tar.gz: 8ae6e22ea8316916fc3ccb54d42521dbc88171932fa3915ec3a653928923f14ed8f488b0e702b09d543ae4160013bb9331f1ea0a810e00a7671f0da890697956
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # WaterDrop changelog
2
2
 
3
+ ## 0.1.10
4
+ - Switched raise_on_failure to ignore all StandardError failures (or not to), not just specific once
5
+ - Reloading inside connection pool connection that seems to be broken (one that failed) - this should prevent from multiple issues (but not from single one) that are related to the connection
6
+
3
7
  ## 0.1.9
4
- - Required acks and set to - (most secure but slower)
8
+ - Required acks and set to -1 (most secure but slower)
5
9
  - Added a proxu layer to to producer so we could replate Kafka with other messaging systems
6
10
  - Gem dump
7
11
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- waterdrop (0.1.9)
4
+ waterdrop (0.1.10)
5
5
  aspector
6
6
  bundler
7
7
  connection_pool
data/README.md CHANGED
@@ -154,6 +154,8 @@ a message with the given message will be send before and after the method execut
154
154
  * [Sidekiq Glass](https://github.com/karafka/sidekiq-glass)
155
155
  * [Envlogic](https://github.com/karafka/envlogic)
156
156
  * [Null Logger](https://github.com/karafka/null-logger)
157
+ * [WaterDrop Travis CI](https://travis-ci.org/karafka/waterdrop)
158
+ * [WaterDrop Code Climate](https://codeclimate.com/github/karafka/waterdrop)
157
159
 
158
160
  ## Note on Patches/Pull Requests
159
161
 
@@ -3,12 +3,6 @@ module WaterDrop
3
3
  class Message
4
4
  attr_reader :topic, :message
5
5
 
6
- # we ignore this types of errors if ::WaterDrop.config.raise_on_failure?
7
- # is set to false
8
- CATCHED_ERRORS = [
9
- Poseidon::Errors::UnableToFetchMetadata
10
- ]
11
-
12
6
  # @param topic [String, Symbol] a topic to which we want to send a message
13
7
  # @param message [Object] any object that can be serialized to a JSON string or
14
8
  # that can be casted to a string
@@ -33,9 +27,9 @@ module WaterDrop
33
27
  ])
34
28
  end
35
29
  ::WaterDrop.logger.info("Message #{message} was sent to topic '#{topic}'")
36
- rescue *CATCHED_ERRORS => e
30
+ rescue StandardError => e
37
31
  # Even if we dont reraise this exception, it should log that it happened
38
- ::WaterDrop.logger.fatal(e)
32
+ ::WaterDrop.logger.error(e)
39
33
  # Reraise if we want to raise on failure
40
34
  # Ignore if we dont want to know that something went wrong
41
35
  return unless ::WaterDrop.config.raise_on_failure?
@@ -27,11 +27,16 @@ module WaterDrop
27
27
  # @param messages [Array<Poseidon::MessageToSend>] array with messages that we want to send
28
28
  # @return [Boolean] were the messages send
29
29
  # @note Even if you send one message - it still needs to be in an array
30
+ # @note If something goes wrong it will assume that producer is corrupted and will try to
31
+ # create a new one
30
32
  # @example Send 1 message
31
33
  # ProducerProxy.new.send_messages([Poseidon::MessageToSend.new(topic, message)])
32
34
  def send_messages(messages)
33
35
  touch
34
36
  producer.send_messages(messages)
37
+ rescue StandardError => e
38
+ reload!
39
+ raise(e)
35
40
  end
36
41
 
37
42
  private
@@ -1,5 +1,5 @@
1
1
  # WaterDrop library
2
2
  module WaterDrop
3
3
  # Current WaterDrop version
4
- VERSION = '0.1.9'.freeze
4
+ VERSION = '0.1.10'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-22 00:00:00.000000000 Z
12
+ date: 2015-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler