Download the PHP package marko/pubsub-redis without Composer
On this page you can find all versions of the php package marko/pubsub-redis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marko/pubsub-redis
More information about marko/pubsub-redis
Files in marko/pubsub-redis
Package pubsub-redis
Short Description Redis pub/sub driver for Marko Framework
License MIT
Informations about the package pubsub-redis
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.
Overview
marko/pubsub-redis implements the marko/pubsub contracts using Redis PUB/SUB. RedisPublisher calls PUBLISH and RedisSubscriber supports both channel subscriptions (SUBSCRIBE) and pattern subscriptions (PSUBSCRIBE), making it the only built-in driver that supports psubscribe(). All I/O is non-blocking via amphp/redis.
Installation
This automatically installs marko/pubsub and marko/amphp.
Usage
The module binding wires PublisherInterface → RedisPublisher and SubscriberInterface → RedisSubscriber automatically. Type-hint against the interfaces in your services.
Configure the Redis connection in config/pubsub-redis.php:
API Reference
RedisPublisher
Implements PublisherInterface. Applies the configured channel prefix and calls Redis PUBLISH.
RedisSubscriber
Implements SubscriberInterface. Supports both exact channel and pattern subscriptions.
RedisSubscription
Iterates incoming Redis messages as Message instances. Implements Subscription (IteratorAggregate<int, Message>).
RedisPubSubConnection
Manages the amphp/redis client used by the publisher and the connector used by the subscriber.
AmphpRedisSubscriberInterface / DefaultAmphpRedisSubscriber
Internal abstraction over the amphp/redis subscriber. DefaultAmphpRedisSubscriber is the production implementation; the interface exists to allow substitution in tests.
Documentation
Full usage, API reference, and examples: marko/pubsub-redis
All versions of pubsub-redis with dependencies
amphp/redis Version ^2.0
marko/core Version self.version
marko/config Version self.version
marko/pubsub Version self.version