Record Class ProducedToTopic
java.lang.Object
java.lang.Record
io.krabka.streams.columnar.ProducedToTopic
- Record Components:
topic- the sink topic the record is destined forrecord- the record to produce
Binds one produced record to its sink topic.
A topology evaluation returns these so a single result list can carry the output
of several sinks. ColumnarRunner.sendAsync(java.util.List, org.apache.kafka.clients.producer.Producer)
sends each record to its topic.
Example
List<ProducedToTopic> outputs = built.runBatch("transactions", records);
for (var output : outputs) {
producerLog.info("{} -> {} bytes", output.topic(), output.record().value().length);
}
-
Constructor Summary
ConstructorsConstructorDescriptionProducedToTopic(String topic, ProduceRecord record) Validates that both components are present. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.record()Returns the value of therecordrecord component.topic()Returns the value of thetopicrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ProducedToTopic
Validates that both components are present.- Parameters:
topic- the sink topic the record is destined forrecord- the record to produce- Throws:
NullPointerException- iftopicorrecordis null
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
topic
-
record
-