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

Commit 60996a2

Browse files
allow for higher superbalist/php-pubsub* versions
1 parent b0e9978 commit 60996a2

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,18 +97,24 @@ $pubsub = app(\Superbalist\PubSub\PubSubAdapterInterface::class);
9797
$pubsub = app('pubsub')->connection('redis');
9898

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

105+
// publish multiple messages
106+
$messages = [
107+
'message 1',
108+
'message 2',
109+
];
110+
$pubsub->publishBatch('channel_name', $messages);
111+
106112
// subscribe to a channel
107113
$pubsub->subscribe('channel_name', function ($message) {
108114
var_dump($message);
109115
});
110116

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

114120
PubSub::connection('kafka')->subscribe('channel_name', function ($message) {

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 2.0.2 - 2017-05-16
4+
5+
* Allow for superbalist/php-pubsub ^2.0
6+
* Allow for superbalist/php-pubsub-redis ^2.0
7+
* Allow for superbalist/php-pubsub-google-cloud ^4.0
8+
39
## 2.0.1 - 2017-01-03
410

511
* Allow for superbalist/php-pubsub-google-cloud ^3.0

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"require": {
1212
"php": ">=5.6.0",
1313
"illuminate/support": "^5.3",
14-
"superbalist/php-pubsub": "^1.0",
15-
"superbalist/php-pubsub-redis": "^1.0",
16-
"superbalist/php-pubsub-google-cloud": "^2.0|^3.0",
14+
"superbalist/php-pubsub": "^1.0|^2.0",
15+
"superbalist/php-pubsub-redis": "^1.0|^2.0",
16+
"superbalist/php-pubsub-google-cloud": "^2.0|^3.0|^4.0",
1717
"illuminate/console": "^5.3"
1818
},
1919
"autoload": {

0 commit comments

Comments
 (0)