-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
@@ -2,13 +2,14 @@ module RabbitFeed | |||
class Configuration | |||
include ActiveModel::Validations | |||
|
|||
attr_reader :host, :port, :user, :password, :application, :environment, :exchange, :pool_size, :pool_timeout, :heartbeat, :connect_timeout, :network_recovery_interval, :auto_delete_queue, :auto_delete_exchange | |||
attr_reader :host, :hosts, :port, :user, :password, :application, :environment, :exchange, :pool_size, :pool_timeout, :heartbeat, :connect_timeout, :network_recovery_interval, :auto_delete_queue, :auto_delete_exchange |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is singular host
still relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for connecting when there is not a cluster
I think it makes sense to update README with that new setting. |
@@ -42,6 +43,7 @@ def connection_options | |||
options[:heartbeat] = heartbeat if heartbeat | |||
options[:connect_timeout] = connect_timeout if connect_timeout | |||
options[:host] = host if host | |||
options[:hosts] = hosts if hosts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, ask cause I don't know how this works... is this property being picked up automatically by Bunny
?.. I mean where is this value actually used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this property being picked up automatically by Bunny?
Yes
I mean where is this value actually used?
connection_options
are what is passed to Bunny, see: https://github.com/simplybusiness/rabbit_feed/blob/master/lib/rabbit_feed/connection_concern.rb#L53
Bunny is what is actually uses the configs. RabbitFeed allows you to specify configs in yaml format and passes them to Bunny for you.
ok.. thanks for letting me know. It all looks good to me... What about the codeclimate in red?. anything to be aware of or is it being like that always? |
Codeclimate appears to be having connectivity issues with github, as @gzzsound and I encountered this on another project today. |
Allow specification of multiple hosts
Signed-off-by: @sparrovv |
The purpose of this change is to allow us to forgo the load balancer and allow bunny to manage the hosts directly. This allows us to pass a list of hosts to bunny, of which it will choose one to connect and will failover upon lost connection.
@sparrovv @calo81 @daniel-barlow @PaulMcAdam @jaynefox @cpoo22 Could you please sign off?