src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/KafkaChannelConfig.java
/**
     * Returns Kafka properties built with the configuration data for Producer.
     */
Returns Kafka properties built with the configuration data for Producer.
Returns Kafka properties built with the configuration data for Producer .
default Properties producerProperties() {
        Properties properties = new Properties();
        properties.put("bootstrap.servers", getBootstrapServers());
        properties.put("acks", "all");
        properties.put("retries", 0);
        properties.put("batch.size", 4);
        properties.put("buffer.memory", 33554432);
        properties.put("linger.ms", 10);
        properties.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
        properties.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
        properties.put(ProducerConfig.INTERCEPTOR_CLASSES_CONFIG,
                VersioningProducerInterceptor.class.getName());
        properties.put(PRODUCER_COMPONENT_NAME_PROPERTY, ZK_COMPONENT_NAME);
        properties.put(PRODUCER_RUN_ID_PROPERTY, getFloodlightRegion());
        properties.put(PRODUCER_ZOOKEEPER_CONNECTION_STRING_PROPERTY, getZooKeeperConnectString());
        properties.put(PRODUCER_ZOOKEEPER_RECONNECTION_DELAY_PROPERTY, Long.toString(getZooKeeperReconnectDelayMs()));
        return properties;
    }
default Properties producerProperties ( ) { Properties properties = new Properties ( ) ; properties . put ( "bootstrap.servers" , getBootstrapServers ( ) ) ; properties . put ( "acks" , "all" ) ; properties . put ( "retries" , 0 ) ; properties . put ( "batch.size" , 4 ) ; properties . put ( "buffer.memory" , 33554432 ) ; properties . put ( "linger.ms" , 10 ) ; properties . put ( "key.serializer" , "org.apache.kafka.common.serialization.StringSerializer" ) ; properties . put ( "value.serializer" , "org.apache.kafka.common.serialization.StringSerializer" ) ; properties . put ( ProducerConfig . INTERCEPTOR_CLASSES_CONFIG , VersioningProducerInterceptor . class . getName ( ) ) ; properties . put ( PRODUCER_COMPONENT_NAME_PROPERTY , ZK_COMPONENT_NAME ) ; properties . put ( PRODUCER_RUN_ID_PROPERTY , getFloodlightRegion ( ) ) ; properties . put ( PRODUCER_ZOOKEEPER_CONNECTION_STRING_PROPERTY , getZooKeeperConnectString ( ) ) ; properties . put ( PRODUCER_ZOOKEEPER_RECONNECTION_DELAY_PROPERTY , Long . toString ( getZooKeeperReconnectDelayMs ( ) ) ) ; return properties ; }
Returns Kafka properties built with the configuration data for Producer.
Returns Kafka properties built with the configuration data for Producer .