Skip to content

Commit

Permalink
Fix expiration configuration parameter description
Browse files Browse the repository at this point in the history
According to the RabbitMQ documentation expiration is set as milliseconds.

```
The value of the expiration field describes the TTL period in milliseconds. The same constraints as for x-message-ttl apply. Since the expiration field must be a string, the broker will (only) accept the string representation of the number.
```
https://www.rabbitmq.com/ttl.html#per-message-ttl-in-publishers
  • Loading branch information
alexhelkar authored Apr 3, 2019
1 parent cf67ada commit bf990fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -606,12 +606,12 @@ rpc_clients:
expect_serialized_response: false
```

You can also set a expiration for request in seconds, after which message will no longer be handled by server and client request will simply time out. Setting expiration for messages works only for RabbitMQ 3.x and above. Visit http://www.rabbitmq.com/ttl.html#per-message-ttl for more information.
You can also set a expiration for request in milliseconds, after which message will no longer be handled by server and client request will simply time out. Setting expiration for messages works only for RabbitMQ 3.x and above. Visit http://www.rabbitmq.com/ttl.html#per-message-ttl for more information.

```php
public function indexAction($name)
{
$expiration = 5; // seconds
$expiration = 5000; // milliseconds
$client = $this->get('old_sound_rabbit_mq.integer_store_rpc');
$client->addRequest($body, $server, $requestId, $routingKey, $expiration);
try {
Expand Down

0 comments on commit bf990fb

Please sign in to comment.