MediaWiki REL1_35
EventRelayerKafka Class Reference

Event relayer for Apache Kafka. More...

Inheritance diagram for EventRelayerKafka:
Collaboration diagram for EventRelayerKafka:

Public Member Functions

 __construct (array $params)
 Create Kafka producer.
 
- Public Member Functions inherited from EventRelayer
 notify ( $channel, $event)
 
 notifyMulti ( $channel, $events)
 
 setLogger (LoggerInterface $logger)
 

Protected Member Functions

 doNotify ( $channel, array $events)
 
 getKafkaProducer ()
 Get the producer object from kafka-php.
 

Protected Attributes

Config $config
 Configuration.
 
Produce $producer
 Kafka producer.
 
- Protected Attributes inherited from EventRelayer
LoggerInterface $logger
 

Detailed Description

Event relayer for Apache Kafka.

Configuring for WANCache: 'relayerConfig' => [ 'class' => 'EventRelayerKafka', 'KafkaEventHost' => 'localhost:9092' ],

Definition at line 10 of file EventRelayerKafka.php.

Constructor & Destructor Documentation

◆ __construct()

EventRelayerKafka::__construct ( array  $params)

Create Kafka producer.

Parameters
array$params

Reimplemented from EventRelayer.

Definition at line 30 of file EventRelayerKafka.php.

Member Function Documentation

◆ doNotify()

EventRelayerKafka::doNotify (   $channel,
array  $events 
)
protected
Parameters
string$channel
array$eventsList of event data maps
Returns
bool Success

Reimplemented from EventRelayer.

Definition at line 51 of file EventRelayerKafka.php.

References $producer, and getKafkaProducer().

◆ getKafkaProducer()

EventRelayerKafka::getKafkaProducer ( )
protected

Get the producer object from kafka-php.

Returns
Produce

Definition at line 43 of file EventRelayerKafka.php.

References $producer.

Referenced by doNotify().

Member Data Documentation

◆ $config

Config EventRelayerKafka::$config
protected

Configuration.

Definition at line 16 of file EventRelayerKafka.php.

◆ $producer

Produce EventRelayerKafka::$producer
protected

Kafka producer.

Definition at line 23 of file EventRelayerKafka.php.

Referenced by doNotify(), and getKafkaProducer().


The documentation for this class was generated from the following file: