Class: Kafka::Protocol::EndTxnRequest
- Inherits:
-
Object
- Object
- Kafka::Protocol::EndTxnRequest
- Defined in:
- lib/kafka/protocol/end_txn_request.rb
Instance Method Summary collapse
- #api_key ⇒ Object
- #encode(encoder) ⇒ Object
-
#initialize(transactional_id:, producer_id:, producer_epoch:, transaction_result:) ⇒ EndTxnRequest
constructor
A new instance of EndTxnRequest.
- #response_class ⇒ Object
Constructor Details
#initialize(transactional_id:, producer_id:, producer_epoch:, transaction_result:) ⇒ EndTxnRequest
Returns a new instance of EndTxnRequest.
6 7 8 9 10 11 |
# File 'lib/kafka/protocol/end_txn_request.rb', line 6 def initialize(transactional_id:, producer_id:, producer_epoch:, transaction_result:) @transactional_id = transactional_id @producer_id = producer_id @producer_epoch = producer_epoch @transaction_result = transaction_result end |
Instance Method Details
#api_key ⇒ Object
13 14 15 |
# File 'lib/kafka/protocol/end_txn_request.rb', line 13 def api_key END_TXN_API end |
#encode(encoder) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/kafka/protocol/end_txn_request.rb', line 21 def encode(encoder) encoder.write_string(@transactional_id) encoder.write_int64(@producer_id) encoder.write_int16(@producer_epoch) encoder.write_boolean(@transaction_result) end |
#response_class ⇒ Object
17 18 19 |
# File 'lib/kafka/protocol/end_txn_request.rb', line 17 def response_class EndTxnResposne end |