Class Conf¶
Class \RdKafka\Conf
Methods¶
__construct()¶
public __construct ( ):
__destruct()¶
public __destruct ( ):
dump()¶
public dump ( ): array
- Returns
array
get()¶
public get (
string $name
): string|null
- Parameters
- name
string
- Returns
string|null
getCData()¶
public getCData ( ): \FFI\CData
- Returns
\FFI\CData
set()¶
public set (
string $name,
string $value
): void
Setting non string values like callbacks or default_topic_conf
TopicConf objects is not supported.
For callbacks and default_topic_conf
use corresponding methods directly.
- Parameters
- name
string
- value
string
See also
setDefaultTopicConf()¶
public setDefaultTopicConf (
\RdKafka\TopicConf $topic_conf
): void
- Parameters
- topic_conf
\RdKafka\TopicConf
Deprecated
Set custom TopicConf explicitly in Producer::newTopic()
, Consumer::newTopic()
or KafkaConsumer::newTopic()
.
Note: Topic config properties can be also set directly via Conf.
See also
setDrMsgCb()¶
public setDrMsgCb (
callable $callback
): void
- Parameters
- callback
callable
function(Producer $producer, Message $message, ?mixed $opaque = null)
setErrorCb()¶
public setErrorCb (
callable $callback
): void
- Parameters
- callback
callable
function($consumerOrProducer, int $err, string $reason, ?mixed $opaque = null)
setLogCb()¶
public setLogCb (
?callable $callback
): void
- Parameters
- callback
?callable
function($consumerOrProducer, int $level, string $facility, string $message) or null to disable logging
setOffsetCommitCb()¶
public setOffsetCommitCb (
callable $callback
): void
- Parameters
- callback
callable
function(KafkaConsumer $consumer, int $err, array $topicPartitions, ?mixed $opaque = null)
setOpaque()¶
public setOpaque (
mixed $opaque
): void
- Parameters
- opaque
mixed
setRebalanceCb()¶
public setRebalanceCb (
callable $callback
): void
- Parameters
- callback
callable
function(KafkaConsumer $consumer, int $err, array $topicPartitions, ?mixed $opaque = null)
setStatsCb()¶
public setStatsCb (
callable $callback
): void
- Parameters
- callback
callable
function($consumerOrProducer, string $json, int $jsonLength, ?mixed $opaque = null)
Test Coverage 💚¶
- 💚 Lines: 95.31% (61 / 64)
- 💛 Methods: 85.71% (12 / 14)