Class: NulogyMessageBusConsumer::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/nulogy_message_bus_consumer/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/nulogy_message_bus_consumer/config.rb', line 15

def initialize(options = {})
  defaults = {
    security_protocol: "ssl",
    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(options))
end

Instance Attribute Details

#bootstrap_serversObject

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_idObject

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_idObject

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_secondsObject

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_checksObject

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_millisecondsObject

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_secondsObject

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_secondsObject

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_ageObject

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

#security_protocolObject

Returns the value of attribute security_protocol.



3
4
5
# File 'lib/nulogy_message_bus_consumer/config.rb', line 3

def security_protocol
  @security_protocol
end

#topic_nameObject

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



29
30
31
# File 'lib/nulogy_message_bus_consumer/config.rb', line 29

def update(options = {})
  options.each { |key, value| public_send("#{key}=", value) }
end