Skip to content

About

[READ-ONLY] Redis pub/sub driver for Marko Framework. Issues and PRs at https://github.com/marko-php/marko

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

marko/pubsub-redis

Non-blocking Redis pub/sub for Marko -- publish and subscribe over Redis with pattern support, powered by amphp for async I/O.

Installation

composer require marko/pubsub-redis

This automatically installs marko/pubsub and marko/amphp.

Quick Example

use Marko\PubSub\Message;

$publisher->publish(
    channel: 'user.42',
    message: new Message(channel: 'user.42', payload: json_encode(['text' => 'Hello!'])),
);

// Every subscription from the process shares one Redis connection
$subscription = $subscriber->subscribe('user.42');

foreach ($subscription as $message) {
    $data = json_decode($message->payload, true);
}

Documentation

Full usage, configuration, the shared-connection model, and API reference: marko/pubsub-redis

About

[READ-ONLY] Redis pub/sub driver for Marko Framework. Issues and PRs at https://github.com/marko-php/marko

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages