Skip to content

Class ProducerTopic

Class \RdKafka\ProducerTopic

Methods

__construct()

public __construct ( 
    \RdKafka\Producer $producer, 
    string $name, 
    ?\RdKafka\TopicConf $conf = null
 ): 
Parameters
producer \RdKafka\Producer
name string
conf ?\RdKafka\TopicConf

produce()

public produce ( 
    int $partition, 
    int $msgflags, 
    ?string $payload = null, 
    ?string $key = null, 
    mixed $opaque = null
 ): void
Parameters
partition int
msgflags int
payload ?string
key ?string
opaque mixed

producev()

public producev ( 
    int $partition, 
    int $msgflags, 
    ?string $payload = null, 
    ?string $key = null, 
    ?array $headers = null, 
    ?int $timestamp_ms = null, 
    mixed $opaque = null
 ): void
Parameters
partition int
msgflags int
payload ?string
key ?string
headers ?array
timestamp_ms ?int
opaque mixed

Test Coverage ๐Ÿ’›

  • ๐Ÿ’› Lines: 89.66% (52 / 58)
  • ๐Ÿงก Methods: 60% (3 / 5)