Class: NulogyMessageBusConsumer::Config
- Inherits:
-
Object
- Object
- NulogyMessageBusConsumer::Config
- Defined in:
- lib/nulogy_message_bus_consumer/config.rb
Instance Attribute Summary collapse
-
#bootstrap_servers ⇒ Object
Returns the value of attribute bootstrap_servers.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#consumer_group_id ⇒ Object
Returns the value of attribute consumer_group_id.
-
#lag_check_interval_seconds ⇒ Object
Returns the value of attribute lag_check_interval_seconds.
-
#lag_checks ⇒ Object
Returns the value of attribute lag_checks.
-
#lag_timeout_milliseconds ⇒ Object
Returns the value of attribute lag_timeout_milliseconds.
-
#log_lag_interval_seconds ⇒ Object
Returns the value of attribute log_lag_interval_seconds.
-
#prune_interval_seconds ⇒ Object
Returns the value of attribute prune_interval_seconds.
-
#prune_max_age ⇒ Object
Returns the value of attribute prune_max_age.
-
#topic_name ⇒ Object
Returns the value of attribute topic_name.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
- #update(options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 14 def initialize( = {}) defaults = { lag_check_interval_seconds: 20, lag_checks: 6, lag_timeout_milliseconds: 200, log_lag_interval_seconds: 1.minute.to_i, prune_interval_seconds: 1.hour.to_i, prune_max_age: 8.days } update(defaults.merge()) end |
Instance Attribute Details
#bootstrap_servers ⇒ Object
Returns the value of attribute bootstrap_servers.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def bootstrap_servers @bootstrap_servers end |
#client_id ⇒ Object
Returns the value of attribute client_id.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def client_id @client_id end |
#consumer_group_id ⇒ Object
Returns the value of attribute consumer_group_id.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def consumer_group_id @consumer_group_id end |
#lag_check_interval_seconds ⇒ Object
Returns the value of attribute lag_check_interval_seconds.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def lag_check_interval_seconds @lag_check_interval_seconds end |
#lag_checks ⇒ Object
Returns the value of attribute lag_checks.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def lag_checks @lag_checks end |
#lag_timeout_milliseconds ⇒ Object
Returns the value of attribute lag_timeout_milliseconds.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def lag_timeout_milliseconds @lag_timeout_milliseconds end |
#log_lag_interval_seconds ⇒ Object
Returns the value of attribute log_lag_interval_seconds.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def log_lag_interval_seconds @log_lag_interval_seconds end |
#prune_interval_seconds ⇒ Object
Returns the value of attribute prune_interval_seconds.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def prune_interval_seconds @prune_interval_seconds end |
#prune_max_age ⇒ Object
Returns the value of attribute prune_max_age.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def prune_max_age @prune_max_age end |
#topic_name ⇒ Object
Returns the value of attribute topic_name.
3 4 5 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3 def topic_name @topic_name end |
Instance Method Details
#update(options = {}) ⇒ Object
27 28 29 |
# File 'lib/nulogy_message_bus_consumer/config.rb', line 27 def update( = {}) .each { |key, value| public_send("#{key}=", value) } end |