Download the PHP package cerpus/pubsub without Composer
On this page you can find all versions of the php package cerpus/pubsub. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download cerpus/pubsub
More information about cerpus/pubsub
Files in cerpus/pubsub
Download cerpus/pubsub
More information about cerpus/pubsub
Files in cerpus/pubsub
Please rate this library. Is it a good library?
Informations about the package pubsub
Cerpus\PubSub
Simple publish-subscribe for RabbitMQ and PHP.
Requirements
- PHP 8.0, 8.1, or 8.2
- The extensions required by php-amqplib
Installation
composer require cerpus/pubsub
Usage
use Cerpus\PubSub\Connection\ConnectionFactory;
use Cerpus\PubSub\PubSub;
$connectionFactory = new ConnectionFactory('localhost', 5672, 'guest', 'guest', '/');
$pubSub = new PubSub($connectionFactory->connect());
// publish your own messages
$pubSub->publish('some_other_topic', 'some data');
// listen for incoming messages
$pubSub->subscribe('subscriber_name', 'some_topic', function (string $data) {
// do something with the data
echo "$data\n";
});
$pubSub->listen();
Future scope
- Support ext-amqp, queue-interop
- Handle more exceptions from underlying libraries
- Support configuring flags like auto-delete, etc.
License
This package is released under the MIT license. See the LICENSE
file for more
information.
All versions of pubsub with dependencies
PHP Build Version
Package Version
Requires
php Version
8.0.*|8.1.*|8.2.*|8.3.*
php-amqplib/php-amqplib Version ^3.1
psr/log Version ^1.0|^2.0|^3.0
php-amqplib/php-amqplib Version ^3.1
psr/log Version ^1.0|^2.0|^3.0
The package cerpus/pubsub contains the following files
Loading the files please wait ....