Skip to content

Commit f291751

Browse files
committed
[custom-handler] changelog and readme updates
1 parent 8d6280d commit f291751

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.15.0] - 2024-06-05
5+
### Added
6+
- Support for custom reciving handler via `Rabbit.config.handler_resolver_callable` config;
7+
48
## [0.14.0] - 2023-02-27
59
### Added
610
- Exception notifier is required

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ Rabbit.publish(
149149
to teardown and setup external connections between daemon restarts, for example ORM connections
150150
151151
- After the server runs, received messages are handled by `Rabbit::EventHandler` subclasses in two possible ways:
152-
a) Subclasses are selected by following code(by default):
153-
```ruby
154-
"rabbit/handler/#{group_id}/#{event}".camelize.constantize
155-
```
156-
b) you can change default behaviour to your own logic by setting the `handler_resolver_callable` config option with a `Proc` that should return the handler class:
157-
```ruby
158-
Rabbit.config.handler_resolver_callable = -> (group_id, event) { "recivers/#{group_id}/#{event}".camelize.constantize }
159-
```
152+
- a) Subclasses are selected by following code(by default):
153+
```ruby
154+
rabbit/handler/#{group_id}/#{event}".camelize.constantize
155+
```
156+
- b) you can change default behaviour to your own logic by setting the `handler_resolver_callable` config option with a `Proc` that should return the handler class:
157+
```ruby
158+
Rabbit.config.handler_resolver_callable = -> (group_id, event) { "recivers/#{group_id}/#{event}".camelize.constantize }
159+
```
160160
161161
They use powerful `Tainbox` api to handle message data. Project_id also passed to them.
162162

0 commit comments

Comments
 (0)