class ProcessorRecordContext implements RecordContext, RecordMetadata {

    public long residentMemorySizeEstimate() {
        long size = 0;
        size += Long.BYTES; // value.context.timestamp
        size += Long.BYTES; // value.context.offset
        if (topic != null) {
            size += topic.toCharArray().length;
        }
        size += Integer.BYTES; // partition
        if (headers != null) {
            for (final Header header : headers) {
                size += header.key().toCharArray().length;
                final byte[] value = header.value();
                if (value != null) {
                    size += value.length;
                }
            }
        }
        return size;
    }

    public  ProcessorRecordContext(final long timestamp,
                                  final long offset,
                                  final int partition,
                                  final String topic,
                                  final Headers headers);

}