Package kafka.producer

Examples of kafka.producer.SyncProducerConfig


    props.setProperty("buffer.size", Integer.toString(bufSize));
    props.setProperty("connect.timeout.ms", Integer.toString(timeout));
    props.setProperty("reconnect.interval", Integer.toString(interval));
    props.setProperty("max.message.size", Integer.toString(maxSize));

    SyncProducer producer = new SyncProducer(new SyncProducerConfig(props));
    return new KafkaRecordWriter<W>(producer, topic, queueSize);
  }
View Full Code Here


        producerProps.put("host", _uri.getHost());
        producerProps.put("port", String.valueOf(_uri.getPort()));
        producerProps.put("buffer.size", String.valueOf(TCP_BUFFER_SIZE));
        producerProps.put("connect.timeout.ms", String.valueOf(CONNECT_TIMEOUT));
        producerProps.put("reconnect.interval", String.valueOf(RECONNECT_INTERVAL));
    _producer = new SyncProducer(new SyncProducerConfig(producerProps));
     
  }
View Full Code Here

        producerProps.put("host", _uri.getHost());
        producerProps.put("port", String.valueOf(_uri.getPort()));
        producerProps.put("buffer.size", String.valueOf(TCP_BUFFER_SIZE));
        producerProps.put("connect.timeout.ms", String.valueOf(CONNECT_TIMEOUT));
        producerProps.put("reconnect.interval", String.valueOf(RECONNECT_INTERVAL));
    _producer = new SyncProducer(new SyncProducerConfig(producerProps));
     
  }
View Full Code Here

    props.put("host", kafkaServerURL);
    props.put("port", String.valueOf(kafkaServerPort));
    props.put("buffer.size", String.valueOf(kafkaProducerBufferSize));
    props.put("connect.timeout.ms", String.valueOf(connectionTimeOut));
    props.put("reconnect.interval", String.valueOf(reconnectInterval));
    producer = new SyncProducer(new SyncProducerConfig(props));
    this.topic = topic;

    this.messageSize = messageSize;
    producerName = name;
    this.batchSize = batchSize;
View Full Code Here

    props.setProperty("buffer.size", Integer.toString(bufSize));
    props.setProperty("connect.timeout.ms", Integer.toString(timeout));
    props.setProperty("reconnect.interval", Integer.toString(interval));
    props.setProperty("max.message.size", Integer.toString(maxSize));

    SyncProducer producer = new SyncProducer(new SyncProducerConfig(props));
    return new KafkaRecordWriter<W>(producer, topic, queueSize);
  }
View Full Code Here

TOP

Related Classes of kafka.producer.SyncProducerConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.