From 91a17ed6f97283241b08f8328c4157509fe86cf8 Mon Sep 17 00:00:00 2001 From: Bas Kamer Date: Mon, 25 Sep 2023 10:02:16 +0200 Subject: [PATCH 1/2] update README deps --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 78b8834e..e81f8d76 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ The JSON-RPC part implements [JSON-RPC 2.0 Specification](http://www.jsonrpc.org Current supported drivers are: [php-amqp](https://github.com/pdezwart/php-amqp) and [PhpAmqpLib](https://github.com/php-amqplib/php-amqplib). php-amqp needs at least to be v1.9.3 -php-amqplib needs at least to be v2.11.0 +php-amqplib needs at least to be v3 This library ships with `psr/container` factories that help you setting up everything. From 24b0eace62af799da6ab1ecc53d27edbe2b86021 Mon Sep 17 00:00:00 2001 From: Bas Kamer Date: Mon, 25 Sep 2023 10:02:42 +0200 Subject: [PATCH 2/2] update README --- README.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index e81f8d76..a46dd7eb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ PHP 7.4 AMQP library ## Overview -PHP 7.4 AMQP libray supporting multiple drivers and providing full-featured Consumer, Producer, and JSON-RPC Client / Server implementations. +PHP 7.4+ AMQP libray supporting multiple drivers and providing full-featured Consumer, Producer, and JSON-RPC Client / Server implementations. The JSON-RPC part implements [JSON-RPC 2.0 Specification](http://www.jsonrpc.org/specification). @@ -37,15 +37,14 @@ You can install prolic/humus-amqp via composer by adding `"prolic/humus-amqp": " $exchangeName = 'test-exchange'; $exchange = ExchangeFactory::$exchangeName($container); - - $exchange->publish('test-message'); + $exchange->publish('test-message'); ### Queue $queueName = 'test-queue'; $queue = QueueFactory::$queueName($container); - + $message = $queue->get(); $queue->ack($message->getDeliveryTag()); @@ -53,7 +52,7 @@ You can install prolic/humus-amqp via composer by adding `"prolic/humus-amqp": " $producerName = 'test-producer'; $producer = ProducerFactory::$producerName($container); - + $producer->confirmSelect(); $producer->publish(['foo' => 'bar'], 'my-routing-key'); $producer->waitForConfirm(); @@ -84,20 +83,19 @@ This is a slight BC break, but the old behaviour was so problematic, that I had ### AMQP-Extension -1) We recommend using php-amqp >=v1.9.3 or compiling it from master, if you encounter any problems with the amqp extension, check -their issue tracker, first. +1. We recommend using php-amqp >=v1.9.3 or compiling it from master, if you encounter any problems with the amqp extension, check + their issue tracker, first. The ext-amqp driver is the most performant. - ### PhpAmqpLib -1) When using php-amqplib as driver, it's worth point out, that a StreamConnection (same goes for SSLConnection) does not -have the possibility to timeout. If you want to let the consumer timeout, when no more messages are received, you should -use the SocketConnection instead (assuming you don't need an SSL connection). +1. When using php-amqplib as driver, it's worth point out, that a StreamConnection (same goes for SSLConnection) does not + have the possibility to timeout. If you want to let the consumer timeout, when no more messages are received, you should + use the SocketConnection instead (assuming you don't need an SSL connection). -2) When using php-amqplib as driver and you're using the LazyConnection, you should not create the channel yourself, call -instead `$channel = $connection->newChannel()` +2. When using php-amqplib as driver and you're using the LazyConnection, you should not create the channel yourself, call + instead `$channel = $connection->newChannel()` ## Support