All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.deeplearning4j.streaming.kafka.NDArrayKafkaClient Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta_spark_1
Show newest version
package org.deeplearning4j.streaming.kafka;

import lombok.Builder;
import org.apache.camel.CamelContext;

/**
 * Created by agibsonccc on 7/31/16.
 */
@Builder
public class NDArrayKafkaClient {
    private String kafkaUri;
    private String zooKeeperConnection;
    private CamelContext camelContext;
    private String kafkaTopic;
    public final static String NDARRAY_TYPE_HEADER = "ndarraytype";


    public NDArrayPublisher createPublisher() {
        return NDArrayPublisher.builder().kafkaUri(kafkaUri)
                .topicName(kafkaTopic).camelContext(camelContext).build();
    }

    public NDArrayConsumer createConsumer() {
        return NDArrayConsumer.builder().camelContext(camelContext)
                .kafkaUri(kafkaUri).topicName(kafkaTopic).build();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy