use of org.apache.kafka.streams.Topology.AutoOffsetReset in project kafka by apache.
the class StreamSourceNode method merge.
public void merge(final StreamSourceNode<?, ?> other) {
final AutoOffsetReset resetPolicy = consumedInternal().offsetResetPolicy();
final AutoOffsetReset otherResetPolicy = other.consumedInternal().offsetResetPolicy();
if (resetPolicy != null && !resetPolicy.equals(otherResetPolicy) || otherResetPolicy != null && !otherResetPolicy.equals(resetPolicy)) {
log.error("Tried to merge source nodes {} and {} which are subscribed to the same topic/pattern, but " + "the offset reset policies do not match", this, other);
throw new TopologyException("Can't configure different offset reset policies on the same input topic(s)");
}
for (final GraphNode otherChild : other.children()) {
other.removeChild(otherChild);
addChild(otherChild);
}
}
Aggregations