Class: KafkaSyrup::Protocol::ProduceRequest
- Defined in:
- lib/kafka_syrup/protocol/produce_request.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#required_acks ⇒ Object
Returns the value of attribute required_acks.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#topics ⇒ Object
Returns the value of attribute topics.
Attributes inherited from Request
Instance Method Summary collapse
Methods inherited from Request
#api_key, #api_version, #initialize
Methods inherited from Base
#==, #config, #decode, #initialize
Methods included from Utils
Constructor Details
This class inherits a constructor from KafkaSyrup::Protocol::Request
Instance Attribute Details
#required_acks ⇒ Object
Returns the value of attribute required_acks.
6 7 8 |
# File 'lib/kafka_syrup/protocol/produce_request.rb', line 6 def required_acks @required_acks end |
#timeout ⇒ Object
Returns the value of attribute timeout.
6 7 8 |
# File 'lib/kafka_syrup/protocol/produce_request.rb', line 6 def timeout @timeout end |
#topics ⇒ Object
Returns the value of attribute topics.
6 7 8 |
# File 'lib/kafka_syrup/protocol/produce_request.rb', line 6 def topics @topics end |
Instance Method Details
#add_topic(name) ⇒ Object
16 17 18 19 20 |
# File 'lib/kafka_syrup/protocol/produce_request.rb', line 16 def add_topic(name) topic = Topic.new(name, []) topics << topic topic end |
#defaults ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/kafka_syrup/protocol/produce_request.rb', line 8 def defaults { required_acks: config.produce_required_acks, timeout: config.produce_timeout, topics: [] } end |