@Test public void shouldBeFlaggedAsTransactionalWhenTransactionalRecords() throws Exception { final MemoryRecords memoryRecords = MemoryRecords.withTransactionalRecords(0, CompressionType.NONE, 1L, (short) 1, 1, 1, simpleRecord); final ProduceRequest request = new ProduceRequest.Builder(RecordBatch.CURRENT_MAGIC_VALUE, (short) -1, 10, Collections.singletonMap( new TopicPartition("topic", 1), memoryRecords)).build(); assertTrue(request.isTransactional()); }
public boolean isTransactional() { return transactional; }
ProduceRequest extends AbstractRequest { public boolean isTransactional() { return transactional; } }
ProduceRequest extends AbstractRequest { public boolean isTransactional() { return transactional; } private  ProduceRequest(short version, short acks, int timeout, Map<TopicPartition, MemoryRecords> partitionRecords, String transactionalId);  ProduceRequest(Struct struct, short version); }
ProduceRequest extends AbstractRequest { public boolean isTransactional() { return transactional; } private  ProduceRequest(short version, short acks, int timeout, Map<TopicPartition, MemoryRecords> partitionRecords, String transactionalId);  ProduceRequest(Struct struct, short version); @Override Struct toStruct(); @Override String toString(boolean verbose); @Override ProduceResponse getErrorResponse(int throttleTimeMs, Throwable e); short acks(); int timeout(); String transactionalId(); boolean isTransactional(); boolean isIdempotent(); Map<TopicPartition, MemoryRecords> partitionRecordsOrFail(); void clearPartitionRecords(); static ProduceRequest parse(ByteBuffer buffer, short version); static byte requiredMagicForVersion(short produceRequestVersion); }
ProduceRequest extends AbstractRequest { public boolean isTransactional() { return transactional; } private  ProduceRequest(short version, short acks, int timeout, Map<TopicPartition, MemoryRecords> partitionRecords, String transactionalId);  ProduceRequest(Struct struct, short version); @Override Struct toStruct(); @Override String toString(boolean verbose); @Override ProduceResponse getErrorResponse(int throttleTimeMs, Throwable e); short acks(); int timeout(); String transactionalId(); boolean isTransactional(); boolean isIdempotent(); Map<TopicPartition, MemoryRecords> partitionRecordsOrFail(); void clearPartitionRecords(); static ProduceRequest parse(ByteBuffer buffer, short version); static byte requiredMagicForVersion(short produceRequestVersion);  }