Skip to content

Commit 2c375eb

Browse files
committed
Updated README
1 parent df15f48 commit 2c375eb

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,42 @@ Kafka Queue driver for Laravel
44
[![Build Status](https://travis-ci.org/rapideinternet/laravel-queue-kafka.svg?branch=master)](https://travis-ci.org/rapideinternet/laravel-queue-kafka)
55
[![Total Downloads](https://poser.pugx.org/rapide/laravel-queue-kafka/downloads?format=flat-square)](https://packagist.org/packages/rapide/laravel-queue-kafka)
66
[![StyleCI](https://styleci.io/repos/99249783/shield)](https://styleci.io/repos/99249783)
7-
[![License](https://poser.pugx.org/rapide/laravel-queue-kafka/license?format=flat-square)](https://packagist.org/packages/rapide/laravel-queue-kafka)
7+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
88

99
#### Installation
1010

11-
1. Install this package via composer using:
11+
1. Install [librdkafka c library](https://github.com/edenhill/librdkafka)
12+
13+
```bash
14+
$ cd /tmp
15+
$ mkdir librdkafka
16+
$ cd librdkafka
17+
$ git clone https://github.com/edenhill/librdkafka.git .
18+
$ ./configure
19+
$ make
20+
$ make install
21+
```
22+
2. Install the [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka) PECL extension
23+
24+
```bash
25+
$ pecl install rdkafka
26+
```
27+
28+
3. Add the following to your php.ini file to enable the php-rdkafka extension
29+
`extension=rdkafka.so`
30+
31+
4. Install this package via composer using:
1232

1333
`composer require rapide/laravel-queue-kafka`
1434

15-
2. Add LaravelQueueKafkaServiceProvider to `providers` array in `config/app.php`:
35+
5. Add LaravelQueueKafkaServiceProvider to `providers` array in `config/app.php`:
1636

1737
`Rapide\LaravelQueueKafka\LaravelQueueKafkaServiceProvider::class,`
1838

19-
3. Add these properties to `.env` with proper values:
39+
6. Add these properties to `.env` with proper values:
2040

2141
QUEUE_DRIVER=kafka
2242

23-
You can also find full examples in src/examples folder.
24-
2543
#### Usage
2644

2745
Once you completed the configuration you can use Laravel Queue API. If you used other queue drivers you do not need to change anything else. If you do not know how to use Queue API, please refer to the official Laravel documentation: http://laravel.com/docs/queues
@@ -37,14 +55,12 @@ vendor/bin/phpunit
3755
#### Acknowledgement
3856

3957
This library is inspired by [laravel-queue-rabbitmq](https://github.com/vyuldashev/laravel-queue-rabbitmq) by vyuldashev.
40-
And the Kafka implementation by [https://github.com/Superbalist/php-pubsub-kafka](Superbalist)
58+
And the Kafka implementations by [Superbalist](https://github.com/Superbalist/php-pubsub-kafka) be sure to check those out.
4159

4260
#### Contribution
4361

4462
You can contribute to this package by discovering bugs and opening issues. Please, add to which version of package you create pull request or issue.
4563

46-
#### Supported versions of Laravel (+Lumen)
47-
48-
5.4
64+
#### Supported versions of Laravel
4965

50-
The version is being matched by the release tag of this library.
66+
Tested on: [5.4]

config/kafka.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@
3030
* Determine the number of seconds to sleep if there's an error communicating with kafka
3131
* If set to false, it'll throw an exception rather than doing the sleep for X seconds.
3232
*/
33-
'sleep_on_error' => env('RABBITMQ_ERROR_SLEEP', 5),
33+
'sleep_on_error' => env('KAFKA_ERROR_SLEEP', 5),
3434

3535
];

0 commit comments

Comments
 (0)