A Drupal facade module for Apache Kafka
drush queue-list
/ drush queue-run
DESIGN.md
drush kqpd
: producer demo via Queue APIdrush kqcd
: consumer demo via Queue APIdrush queue-run
command worksdrush kpd
: producer demo, extension-leveldrush khlcd
: high-level consumer demo, extension-leveldrush kllcd
: low-level consumer demo, extension-leveldrush kafka-topics
.Based on php_rdkafka
/ librdkafka
.
Like any Drupal plugin, the module is licensed under the General Public License, version 2.0 or later (SPDX: GPL-2.0+).
Install the Drupal 8 site without the module.
Get IP, port, and list of topics names for the Kafka 0.10 broker you will be using.
Install the librdkafka
client library.
Install the php-rdkafka
PHP extension version 1 or 2 (see "Requirements" for details).
Install the module as usual.
Configure Drupal settings.php
to expose the Kafka queue, either as the
default queue backend, or for specific queue names, and point the services to
the chosen Kafka brokers.
$settings['queue_default'] = 'queue.kafka';
$settings['queue_service_{queue_name}'] = 'queue.kafka';
$settings['kafka'] = [
'consumer' => [
'brokers' => ['127.0.0.1']
],
'producer' => [
'brokers' => ['127.0.0.1'],
],
];
libradkafka
php-rdkafka
master 2016-11-01 or more recent
At this point:
ReliableQueueInterface
). See Kafka documentation about why this is so:Topics handling: