Search in sources :

Example 1 with KafkaRecord

use of org.apache.beam.sdk.io.kafka.KafkaRecord in project beam by apache.

the class NestedPayloadKafkaTableTest method readRecord.

private static KafkaRecord<byte[], byte[]> readRecord(byte[] key, byte[] value, long timestamp, ListMultimap<String, byte[]> attributes) {
    Headers headers = new RecordHeaders();
    attributes.forEach(headers::add);
    return new KafkaRecord<>(TOPIC, 0, 0, timestamp, KafkaTimestampType.LOG_APPEND_TIME, headers, key, value);
}
Also used : RecordHeaders(org.apache.kafka.common.header.internals.RecordHeaders) Headers(org.apache.kafka.common.header.Headers) RecordHeaders(org.apache.kafka.common.header.internals.RecordHeaders) KafkaRecord(org.apache.beam.sdk.io.kafka.KafkaRecord)

Aggregations

KafkaRecord (org.apache.beam.sdk.io.kafka.KafkaRecord)1 Headers (org.apache.kafka.common.header.Headers)1 RecordHeaders (org.apache.kafka.common.header.internals.RecordHeaders)1