public JsonMessageBatch(String id, ByteBuffer buffer, Subscription subscription, Clock clock) { this(id, buffer, subscription.getBatchSubscriptionPolicy().getBatchSize(), subscription.getBatchSubscriptionPolicy().getBatchTime(), clock, subscription.getHeaders()); }
public JsonMessageBatch(String id, ByteBuffer buffer, Subscription subscription, Clock clock) { this(id, buffer, subscription.getBatchSubscriptionPolicy().getBatchSize(), subscription.getBatchSubscriptionPolicy().getBatchTime(), clock, subscription.getHeaders()); }
private Message convertToMessage(ConsumerRecord<byte[], byte[]> record) { KafkaTopic kafkaTopic = topics.get(record.topic()); UnwrappedMessageContent unwrappedContent = getUnwrappedMessageContent(record, kafkaTopic.contentType()); return new Message( unwrappedContent.getMessageMetadata().getId(), topic.getQualifiedName(), unwrappedContent.getContent(), kafkaTopic.contentType(), unwrappedContent.getSchema(), unwrappedContent.getMessageMetadata().getTimestamp(), clock.millis(), new PartitionOffset(kafkaTopic.name(), record.offset(), record.partition()), unwrappedContent.getMessageMetadata().getExternalMetadata(), subscription.getHeaders() ); }
private Message convertToMessage(ConsumerRecord<byte[], byte[]> record) { KafkaTopic kafkaTopic = topics.get(record.topic()); UnwrappedMessageContent unwrappedContent = getUnwrappedMessageContent(record, kafkaTopic.contentType()); return new Message( unwrappedContent.getMessageMetadata().getId(), topic.getQualifiedName(), unwrappedContent.getContent(), kafkaTopic.contentType(), unwrappedContent.getSchema(), unwrappedContent.getMessageMetadata().getTimestamp(), clock.millis(), new PartitionOffset(kafkaTopic.name(), record.offset(), record.partition()), unwrappedContent.getMessageMetadata().getExternalMetadata(), subscription.getHeaders() ); }