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

io.streamthoughts.jikkou.kafka.internals.consumer.ConsumerFactory Maven / Gradle / Ivy

The newest version!
/*
 * SPDX-License-Identifier: Apache-2.0
 * Copyright (c) The original authors
 *
 * Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
 */
package io.streamthoughts.jikkou.kafka.internals.consumer;

import org.apache.kafka.clients.consumer.Consumer;

/**
 * Interface to create a Consumer instance.
 *
 * @param  the key type.
 * @param  the value type.
 */
public interface ConsumerFactory  {

    /**
     * Creates a new Consumer instance.
     *
     * @return  a new {@link Consumer} instance.
     */
    Consumer createConsumer();

    /**
     * Creates a new Consumer instance with an explicit {@code client.id}.
     *
     * @param clientId - override the {@code client.id} property.
     *
     * @return  a new {@link Consumer} instance.
     */
    Consumer createConsumer(String clientId);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy