/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace Kafka.Client.Producers
{
using Kafka.Client.Cfg;
using Kafka.Client.Messages;
using Kafka.Client.Producers.Async;
using Kafka.Client.Producers.Partitioning;
using Kafka.Client.Serialization;
///
/// High-level Producer API that exposes all the producer functionality to the client
/// using as type of key and as type of data
///
public class Producer : Producer
{
///
/// Initializes a new instance of the class.
///
/// The config object.
/// The partitioner that implements
/// used to supply a custom partitioning strategy based on the message key.
/// Pool of producers, one per broker.
/// if set to true, producers should be populated.
///
/// Should be used for testing purpose only.
///
internal Producer(ProducerConfiguration config, IPartitioner partitioner, IProducerPool producerPool, bool populateProducerPool)
: base(config, partitioner, producerPool, populateProducerPool)
{
}
///
/// Initializes a new instance of the class.
///
/// The config object.
///
/// Can be used when all config parameters will be specified through the config object
/// and will be instantiated via reflection
///
public Producer(ProducerConfiguration config)
: base(config)
{
}
///
/// Initializes a new instance of the class.
///
/// The config object.
/// The partitioner that implements
/// used to supply a custom partitioning strategy based on the message key.
/// The encoder that implements
/// The callback handler that implements , used
/// to supply callback invoked when sending asynchronous request is completed.
///
/// Can be used to provide pre-instantiated objects for all config parameters
/// that would otherwise be instantiated via reflection.
///
public Producer(ProducerConfiguration config, IPartitioner partitioner, IEncoder encoder, ICallbackHandler callbackHandler)
: base(config, partitioner, encoder, callbackHandler)
{
}
///
/// Initializes a new instance of the class.
///
/// The config object.
/// The partitioner that implements
/// used to supply a custom partitioning strategy based on the message key.
/// The encoder that implements
///
///
/// Can be used to provide pre-instantiated objects for all config parameters
/// that would otherwise be instantiated via reflection.
///
public Producer(ProducerConfiguration config, IPartitioner partitioner, IEncoder encoder)
: base(config, partitioner, encoder)
{
}
}
}