Exemple #1
0
        public IEnumerable <KeyValuePair <string, object> > GetConfig()
        {
            var configs = new List <KeyValuePair <string, object> >();

            configs.Add(new KeyValuePair <string, object>("bootstrap.servers", Servers));
            configs.Add(new KeyValuePair <string, object>("queue.buffering.max.ms", MaxQueueBuffering.ToString()));
            configs.Add(new KeyValuePair <string, object>("socket.blocking.max.ms", MaxSocketBlocking.ToString()));
            configs.Add(new KeyValuePair <string, object>("enable.auto.commit", EnableAutoCommit.ToString()));
            configs.Add(new KeyValuePair <string, object>("log.connection.close", LogConnectionClose.ToString()));
            return(configs);
        }
Exemple #2
0
        public IEnumerable <KeyValuePair <string, object> > GetConsumerConfig()
        {
            var configs = new List <KeyValuePair <string, object> >();

            configs.Add(new KeyValuePair <string, object>("bootstrap.servers", Servers));
            configs.Add(new KeyValuePair <string, object>("queue.buffering.max.ms", MaxQueueBuffering.ToString()));
            configs.Add(new KeyValuePair <string, object>("socket.blocking.max.ms", MaxSocketBlocking.ToString()));
            configs.Add(new KeyValuePair <string, object>("enable.auto.commit", EnableAutoCommit.ToString()));
            configs.Add(new KeyValuePair <string, object>("log.connection.close", LogConnectionClose.ToString()));
            configs.Add(new KeyValuePair <string, object>("auto.commit.interval.ms", CommitInterval));
            configs.Add(new KeyValuePair <string, object>("auto.offset.reset", OffsetReset.ToString().ToLower()));
            configs.Add(new KeyValuePair <string, object>("session.timeout.ms", SessionTimeout));
            configs.Add(new KeyValuePair <string, object>("group.id", GroupID));
            return(configs);
        }