Skip to content

Class ConsumerTopic

Class \RdKafka\ConsumerTopic

Methods

__construct()

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

__destruct()

public __destruct (  ): 

consume()

public consume ( 
    int $partition, 
    int $timeout_ms
 ): ?\RdKafka\Message
Parameters
partition int
timeout_ms int
Returns
?\RdKafka\Message

consumeBatch()

public consumeBatch ( 
    int $partition, 
    int $timeout_ms, 
    int $batch_size
 ): \RdKafka\Message[]
Parameters
partition int
timeout_ms int
batch_size int
Returns
\RdKafka\Message[]

consumeCallback()

public consumeCallback ( 
    int $partition, 
    int $timeout_ms, 
    callable $callback, 
    mixed $opaque = null
 ): int
Parameters
partition int
timeout_ms int
callback callable
opaque mixed
Returns
int

Deprecated

since 1.4.0 librdkafka

consumeQueueStart()

public consumeQueueStart ( 
    int $partition, 
    int $offset, 
    \RdKafka\Queue $queue
 ): void
Parameters
partition int
offset int
queue \RdKafka\Queue

consumeStart()

public consumeStart ( 
    int $partition, 
    int $offset
 ): void
Parameters
partition int
offset int

consumeStop()

public consumeStop ( 
    int $partition
 ): void
Parameters
partition int

offsetStore()

public offsetStore ( 
    int $partition, 
    int $offset
 ): void
Parameters
partition int
offset int

Test Coverage 💛

  • 💛 Lines: 74.55% (82 / 110)
  • ❤️ Methods: 27.27% (3 / 11)