Skip to content

Commit

Permalink
Allow to configure client properties
Browse files Browse the repository at this point in the history
  • Loading branch information
sharshenov committed May 6, 2024
1 parent a030494 commit 7c77919
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ Known configuration parameters are:
* `error_acknowledgements`: a chain of responsibility of objects that acknowledge/reject/requeue messages when an
exception happens, see classes in `Hutch::Acknowledgements`.
* `mq_exchange`: exchange to use for publishing (default: `hutch`)
* `mq_client_properties`: Bunny's [client properties](https://www.rabbitmq.com/docs/connections#capabilities) (default: `{}`)
* `heartbeat`: [RabbitMQ heartbeat timeout](http://rabbitmq.com/heartbeats.html) (default: `30`)
* `connection_timeout`: Bunny's socket open timeout (default: `11`)
* `read_timeout`: Bunny's socket read timeout (default: `11`)
Expand Down
1 change: 1 addition & 0 deletions lib/hutch/broker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def connection_params
params[:tls_ca_certificates] = @config[:mq_tls_ca_certificates]
end
params[:heartbeat] = @config[:heartbeat]
params[:client_properties] = @config[:mq_client_properties]
params[:connection_name] = @config[:connection_name]
params[:connection_timeout] = @config[:connection_timeout]
params[:read_timeout] = @config[:read_timeout]
Expand Down
1 change: 1 addition & 0 deletions lib/hutch/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def self.initialize(params = {})
# @return [Hash]
def self.default_config
@settings_defaults.merge({
mq_client_properties: {},
mq_exchange_options: {},
mq_tls_cert: nil,
mq_tls_key: nil,
Expand Down

0 comments on commit 7c77919

Please sign in to comment.