public override void Process(K key, V value)
        {
            LogProcessingKeyValue(key, value);
            if (key == null)
            {
                log.LogWarning($"Skipping record due to null key. topic=[{Context.Topic}] partition=[{Context.Partition}] offset=[{Context.Offset}]");
                droppedRecordsSensor.Record();
                return;
            }

            if (queryableName != null)
            {
                ValueAndTimestamp <V> oldValueAndTimestamp = store.Get(key);
                V oldValue;
                if (oldValueAndTimestamp != null)
                {
                    oldValue = oldValueAndTimestamp.Value;
                    if (Context.Timestamp < oldValueAndTimestamp.Timestamp)
                    {
                        log.LogWarning($"Detected out-of-order KTable update for {store.Name} at offset {Context.Offset}, partition {Context.Partition}.");
                    }
                }
                else
                {
                    oldValue = default(V);
                }
                store.Put(key, ValueAndTimestamp <V> .Make(value, Context.Timestamp));
                tupleForwarder.MaybeForward(key, value, oldValue);
            }
            else
            {
                this.Forward <K, Change <V> >(key, new Change <V>(default(V), value));
            }
        }
 public V Get(K key) => innerStore.Get(key) != null?innerStore.Get(key).Value : default;
Ejemplo n.º 3
0
 public ValueAndTimestamp <V> Get(K key)
 => store.Get(key);