waterdrop 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/water_drop/message.rb +2 -8
- data/lib/water_drop/producer_proxy.rb +5 -0
- data/lib/water_drop/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5395d0cffc98192411f2ee5448353e843eff99f
|
4
|
+
data.tar.gz: 97314df129d5eaaf8f530801ba318cfaad3bfb3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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
|
|
data/lib/water_drop/message.rb
CHANGED
@@ -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
|
30
|
+
rescue StandardError => e
|
37
31
|
# Even if we dont reraise this exception, it should log that it happened
|
38
|
-
::WaterDrop.logger.
|
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
|
data/lib/water_drop/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2015-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|