use of org.zalando.nakadi.view.SubscriptionCursorWithoutToken in project nakadi by zalando.
the class StreamingState method addToStreaming.
private void addToStreaming(final Partition partition, final Map<EventTypePartition, SubscriptionCursorWithoutToken> cursorMap) {
final NakadiCursor cursor = createNakadiCursor(cursorMap.get(partition.getKey()));
getLog().info("Adding to streaming {} with start position {}", partition.getKey(), cursor);
final ZkSubscription<SubscriptionCursorWithoutToken> subscription = getZk().subscribeForOffsetChanges(partition.getKey(), () -> addTask(() -> offsetChanged(partition.getKey())));
final PartitionData pd = new PartitionData(getComparator(), subscription, cursor, LoggerFactory.getLogger("subscription." + getSessionId() + "." + partition.getKey()), System.currentTimeMillis());
offsets.put(partition.getKey(), pd);
}
Aggregations