///
import { Promise } from "bluebird";
import { EventEmitter } from "events";
import { Kafka, Producer } from "kafkajs";
import { Metadata, ProducerAnalytics, Check, ProducerRunResult } from "../shared";
import { MessageReturn, JSKafkaProducerConfig, ProducerStats } from "../interfaces";
/**
* native producer wrapper for node-librdkafka
* @extends EventEmitter
*/
export declare class JSProducer extends EventEmitter {
kafkaClient: Kafka;
config: JSKafkaProducerConfig;
paused: boolean;
producer: Producer | undefined;
private _health;
private _adminClient;
private _producerPollIntv;
private _partitionCounts;
private _inClosing;
private _totalSentMessages;
private _lastProcessed;
private _analyticsOptions;
private _analyticsIntv;
_analytics: ProducerAnalytics | undefined;
private _murmurHashVersion;
private _murmur;
private _errors;
defaultPartitionCount: number;
/**
* creates a new producer instance
* @param {object} config - configuration object
* @param {*} _ - ignore this param (api compatability)
* @param {number} defaultPartitionCount - amount of default partitions for the topics to produce to
*/
constructor(config: JSKafkaProducerConfig, defaultPartitionCount?: number);
/**
* @throws
* starts analytics tasks
* @param {object} options - analytic options
*/
enableAnalytics(options?: {
analyticsInterval: number;
}): void;
/**
* halts all analytics tasks
*/
haltAnalytics(): void;
/**
* connects to the broker
* @returns {Promise.<*>}
*/
connect(): Promise;
/**
* returns a partition for a key
* @private
* @param {string} - message key
* @param {number} - partition count of topic, if 0 defaultPartitionCount is used
* @returns {string} - deterministic partition value for key
*/
_getPartitionForKey(key: string, partitionCount?: number): number;
/**
* @async
* produces a kafka message to a certain topic
* @param {string} topicName - name of the topic to produce to
* @param {object|string|null} message - value object for the message
* @param {number} _partition - optional partition to produce to
* @param {string} _key - optional message key
* @param {string} _partitionKey - optional key to evaluate partition for this message
* @returns {Promise.