Class: Kafka::Protocol::InitProducerIDRequest
- Inherits:
-
Object
- Object
- Kafka::Protocol::InitProducerIDRequest
- Defined in:
- lib/kafka/protocol/init_producer_id_request.rb
Instance Method Summary collapse
- #api_key ⇒ Object
- #encode(encoder) ⇒ Object
-
#initialize(transactional_id: nil, transactional_timeout:) ⇒ InitProducerIDRequest
constructor
A new instance of InitProducerIDRequest.
- #response_class ⇒ Object
Constructor Details
#initialize(transactional_id: nil, transactional_timeout:) ⇒ InitProducerIDRequest
Returns a new instance of InitProducerIDRequest.
6 7 8 9 |
# File 'lib/kafka/protocol/init_producer_id_request.rb', line 6 def initialize(transactional_id: nil, transactional_timeout:) @transactional_id = transactional_id @transactional_timeout = transactional_timeout end |
Instance Method Details
#api_key ⇒ Object
11 12 13 |
# File 'lib/kafka/protocol/init_producer_id_request.rb', line 11 def api_key INIT_PRODUCER_ID_API end |
#encode(encoder) ⇒ Object
19 20 21 22 23 |
# File 'lib/kafka/protocol/init_producer_id_request.rb', line 19 def encode(encoder) encoder.write_string(@transactional_id) # Timeout is in ms unit encoder.write_int32(@transactional_timeout * 1000) end |
#response_class ⇒ Object
15 16 17 |
# File 'lib/kafka/protocol/init_producer_id_request.rb', line 15 def response_class InitProducerIDResponse end |