Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
allow for higher superbalist/php-pubsub* versions
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewgoslett committed May 16, 2017
1 parent c620fcf commit 4e91480
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,18 +85,24 @@ $pubsub = app(\Superbalist\PubSub\PubSubAdapterInterface::class);
$pubsub = app('pubsub')->connection('redis');

// publish a message
// the message can be a string, array, json string, bool, object - anything which can be serialized
// the message can be a string, array, bool, object - anything which can be json encoded
$pubsub->publish('channel_name', 'this is where your message goes');
$pubsub->publish('channel_name', ['key' => 'value']);
$pubsub->publish('channel_name', '{"key": "value"}');
$pubsub->publish('channel_name', true);

// publish multiple messages
$messages = [
'message 1',
'message 2',
];
$pubsub->publishBatch('channel_name', $messages);

// subscribe to a channel
$pubsub->subscribe('channel_name', function ($message) {
var_dump($message);
});

// all the aboce commands can also be done using the facade
// all the above commands can also be done using the facade
PubSub::connection('kafka')->publish('channel_name', 'Hello World!');

PubSub::connection('kafka')->subscribe('channel_name', function ($message) {
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.0.2 - 2017-05-16

* Allow for superbalist/php-pubsub ^2.0
* Allow for superbalist/php-pubsub-redis ^2.0
* Allow for superbalist/php-pubsub-google-cloud ^4.0

## 2.0.1 - 2017-01-03

* Allow for superbalist/php-pubsub-google-cloud ^3.0
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"illuminate/container": "^4.0",
"illuminate/support": "^4.0",
"illuminate/config": "^4.0",
"superbalist/php-pubsub": "^1.0",
"superbalist/php-pubsub-redis": "^1.0",
"superbalist/php-pubsub-google-cloud": "^2.0|^3.0"
"superbalist/php-pubsub": "^1.0|^2.0",
"superbalist/php-pubsub-redis": "^1.0|^2.0",
"superbalist/php-pubsub-google-cloud": "^2.0|^3.0|^4.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 4e91480

Please sign in to comment.