示例#1
0
        protected void AddMessageOffset(string topic, int partition, long offset)
        {
            var slidingDoor = SlidingDoors.GetOrAdd(SlidingDoor.GetSlidingDoorKey(topic, partition),
                                                    key => new SlidingDoor(CommitOffset,
                                                                           topic,
                                                                           partition,
                                                                           Configuration.Instance.GetCommitPerMessage()));

            slidingDoor.AddOffset(offset);
        }
示例#2
0
        internal void AddMessage(EQueueMessages.QueueMessage message)
        {
            var slidingDoor = SlidingDoors.GetOrAdd(message.QueueId, partition =>
            {
                return(new SlidingDoor(CommitOffset,
                                       partition,
                                       Configuration.Instance.GetCommitPerMessage()));
            });

            slidingDoor.AddOffset(message.QueueOffset);
        }
示例#3
0
        internal void AddMessage(KafkaMessages.Message message)
        {
            var slidingDoor = SlidingDoors.GetOrAdd(message.PartitionId.Value, partition =>
            {
                return(new SlidingDoor(CommitOffset,
                                       partition,
                                       Configuration.Instance.GetCommitPerMessage()));
            });

            slidingDoor.AddOffset(message.Offset);
        }