Class: KafkaSyrup::Configuration

Inherits:
Struct
  • Object
show all
Defined in:
lib/kafka_syrup.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#brokersObject

Returns the value of attribute brokers

Returns:

  • (Object)

    the current value of brokers



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def brokers
  @brokers
end

#consume_max_bytesObject

Returns the value of attribute consume_max_bytes

Returns:

  • (Object)

    the current value of consume_max_bytes



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def consume_max_bytes
  @consume_max_bytes
end

#consume_max_wait_timeObject

Returns the value of attribute consume_max_wait_time

Returns:

  • (Object)

    the current value of consume_max_wait_time



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def consume_max_wait_time
  @consume_max_wait_time
end

#consume_min_bytesObject

Returns the value of attribute consume_min_bytes

Returns:

  • (Object)

    the current value of consume_min_bytes



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def consume_min_bytes
  @consume_min_bytes
end

#loggerObject

Returns the value of attribute logger

Returns:

  • (Object)

    the current value of logger



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def logger
  @logger
end

#produce_required_acksObject

Returns the value of attribute produce_required_acks

Returns:

  • (Object)

    the current value of produce_required_acks



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def produce_required_acks
  @produce_required_acks
end

#produce_timeoutObject

Returns the value of attribute produce_timeout

Returns:

  • (Object)

    the current value of produce_timeout



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def produce_timeout
  @produce_timeout
end

#retry_backoffObject

Returns the value of attribute retry_backoff

Returns:

  • (Object)

    the current value of retry_backoff



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def retry_backoff
  @retry_backoff
end

#so_sndbufObject

Returns the value of attribute so_sndbuf

Returns:

  • (Object)

    the current value of so_sndbuf



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def so_sndbuf
  @so_sndbuf
end

#zookeeper_hostsObject

Returns the value of attribute zookeeper_hosts

Returns:

  • (Object)

    the current value of zookeeper_hosts



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def zookeeper_hosts
  @zookeeper_hosts
end

#zookeeper_pathObject

Returns the value of attribute zookeeper_path

Returns:

  • (Object)

    the current value of zookeeper_path



16
17
18
# File 'lib/kafka_syrup.rb', line 16

def zookeeper_path
  @zookeeper_path
end

Instance Method Details

#with_defaultsObject



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/kafka_syrup.rb', line 19

def with_defaults
  self.produce_required_acks = -1
  self.produce_timeout = 1500
  self.consume_max_wait_time = 100
  self.consume_min_bytes = 1
  self.consume_max_bytes = 1024 * 1024
  self.so_sndbuf = 100 * 1024
  self.brokers = ''
  self.zookeeper_path = '/'
  self.retry_backoff = 10 * 1000
  self
end