harmoniser 0.3.0 → 0.4.0

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
  SHA256:
3
- metadata.gz: 05d33501383838004a5dbf7f99fc83f9a28eebdd8a85e54bc738672200cbbf37
4
- data.tar.gz: 943cf0cec5a82ee8a05c53c6886df77c1277cfeb3e3f8aa8a8e8cd8358cd2ea2
3
+ metadata.gz: b1feaead73df2956797f89d33ed45a3316cf5191852946c1b0d3cbe2e2284f18
4
+ data.tar.gz: 6ba7ae634d24a012d4243d392d4299a9fd88a35af5df1251efec24bb4817ce9c
5
5
  SHA512:
6
- metadata.gz: b1bfc3d36722722911ad9a7b96765966204b74cdcbfbe9432f58fc1f306097f15810c382c916f6afa53da1244b11ec5b7b0d4d8b1b538e7cb264547081eaacea
7
- data.tar.gz: aefd48071e6c2802a5636a94315acd8864282624754b55caedd704270d6c106d9aa1487a2d9597949e64eed44e206701524c593ac62374f6eec18089b5d052ee
6
+ metadata.gz: 9cfcdeec3f6e205c9301d5f2142cd8e7fee0723ed5950fdf1bd12a704f1cc29ecf971e39c75ef7ace071ea577a37f45a874c4016a63c561d25c3e206f1fb0e6f
7
+ data.tar.gz: 45b409fb2bfa3ec1752101915fad8f52ccf1e5a5ea1402e23ee6fc062e952fbdb78a16015f77bc2ef2ddafda04859eb23d0e9c8c9cef06a9675fe0c44e81f5d5
data/CHANGELOG.md CHANGED
@@ -1,13 +1,19 @@
1
1
  # Changelog
2
2
 
3
- ## [0.1.0] - 2023-11-27
3
+ ## [0.4.0] - 2023-12-07
4
4
 
5
5
  ### Added
6
+ - Default logger with error severity for when errors occur at channel level
7
+ - Default logger with error severity for when errors occur while processing a message from a queue
6
8
 
7
- - Support to express publishing through any kind of exchanges
8
- - Capability to subscribe to queues
9
- - Express RabbitMQ topology separated from the responsibility of publishing or subscribing
10
- - Provide dedicated Ruby process to consume messages through the subscribers defined
9
+ ### Removed
10
+ - Unused docker image for rabbitMQ (only for development purposes)
11
+
12
+ ## [0.3.0] - 2023-11-29
13
+
14
+ ### Added
15
+
16
+ - Introduce github action for building, linting and running specs anytime a pull request is opened or push to master happens
11
17
 
12
18
  ## [0.2.0] - 2023-11-28
13
19
 
@@ -15,8 +21,11 @@
15
21
 
16
22
  - Introduce github action for releasing the gem once is merged into master
17
23
 
18
- ## [0.3.0] - 2023-11-29
24
+ ## [0.1.0] - 2023-11-27
19
25
 
20
26
  ### Added
21
27
 
22
- - Introduce github action for building, linting and running specs anytime a pull request is opened or push to master happens
28
+ - Support to express publishing through any kind of exchanges
29
+ - Capability to subscribe to queues
30
+ - Express RabbitMQ topology separated from the responsibility of publishing or subscribing
31
+ - Provide dedicated Ruby process to consume messages through the subscribers defined
data/README.md CHANGED
@@ -125,7 +125,6 @@ You can also shell into the running container by executing `$ make shell` and fr
125
125
  - [ ] Chore: Introduce simplecov gem for code coverage.
126
126
  - [ ] Feature: Add sensible defaults for Session options like heartbeat, timeout, recovery_completed or recovery_attempt_started.
127
127
  - [ ] Feature: Add default `on_return` handler as well as permitting the definition of on_return method to be called anytime a published message gets returned.
128
- - [ ] Feature: Add default `on_error` and `on_uncaught_exception` as well as permitting the definition of them to be called anytime an error in the channel occurs or error in the consumer handler happens.
129
128
  - [ ] Feature: Introduce capability of configuring number of threads for queue consuming at the CLI.
130
129
 
131
130
  ## License
@@ -11,8 +11,20 @@ module Harmoniser
11
11
  end
12
12
 
13
13
  def create_channel
14
- connection = Harmoniser.connection
15
- connection.create_channel
14
+ channel = Harmoniser.connection.create_channel
15
+ channel.on_error(&method(:on_error).to_proc)
16
+ channel.on_uncaught_exception(&method(:on_uncaught_exception).to_proc)
17
+ channel
18
+ end
19
+
20
+ private
21
+
22
+ def on_error(channel, amq_method)
23
+ Harmoniser.logger.error("Default on_error handler executed for channel: method = `#{amq_method}`, exchanges = `#{channel.exchanges.keys}`, queues = `#{channel.queues.keys}`")
24
+ end
25
+
26
+ def on_uncaught_exception(error, consumer)
27
+ Harmoniser.logger.error("Default on_uncaught_exception handler executed for channel: error_class = `#{error.class}`, error_message = `#{error.message}`, error_backtrace = `#{error.backtrace&.first(5)}, queue = `#{consumer.queue}`")
16
28
  end
17
29
  end
18
30
 
@@ -1,3 +1,3 @@
1
1
  module Harmoniser
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harmoniser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jose Lloret
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-28 00:00:00.000000000 Z
11
+ date: 2023-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny