Skip to content

Commit e7b0db0

Browse files
authored
Fix typos and increase readability of Readme (#698)
1 parent a86783b commit e7b0db0

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
## About ##
1212

13-
The RabbitMqBundle incorporates messaging in your application via [RabbitMQ](http://www.rabbitmq.com/) using the [php-amqplib](http://github.com/php-amqplib/php-amqplib) library.
13+
The `RabbitMqBundle` incorporates messaging in your application via [RabbitMQ](http://www.rabbitmq.com/) using the [php-amqplib](http://github.com/php-amqplib/php-amqplib) library.
1414

1515
The bundle implements several messaging patterns as seen on the [Thumper](https://github.com/php-amqplib/Thumper) library. Therefore publishing messages to RabbitMQ from a Symfony controller is as easy as:
1616

@@ -386,7 +386,7 @@ class OnConsumeEvent extends AMQPEvent
386386
```
387387

388388
Let`s say you need to sleep / stop consumer/s on a new application deploy.
389-
You can listen for OnConsumeEvent (\OldSound\RabbitMqBundle\Event\OnConsumeEvent) and check for new application deploy.
389+
You can listen for `OldSound\RabbitMqBundle\Event\OnConsumeEvent` and check for new application deploy.
390390

391391
##### BEFORE PROCESSING MESSAGE #####
392392

@@ -407,7 +407,7 @@ class BeforeProcessingMessageEvent extends AMQPEvent
407407
}
408408
}
409409
```
410-
Event raised before processing a AMQPMessage.
410+
Event raised before processing a `AMQPMessage`.
411411

412412
##### AFTER PROCESSING MESSAGE #####
413413

@@ -428,7 +428,7 @@ class AfterProcessingMessageEvent extends AMQPEvent
428428
}
429429
}
430430
```
431-
Event raised after processing a AMQPMessage.
431+
Event raised after processing a `AMQPMessage`.
432432
If the process message will throw an Exception the event will not raise.
433433

434434
##### IDLE MESSAGE #####
@@ -460,7 +460,7 @@ By default process exit on idle timeout, you can prevent it by setting `$event->
460460
#### Idle timeout ####
461461

462462
If you need to set a timeout when there are no messages from your queue during a period of time, you can set the `idle_timeout` in seconds.
463-
The `idle_timeout_exit_code` specifies what exit code should be returned by the consumer when the idle timeout occurs. Without specifying it, the consumer will throw an **PhpAmqpLib\Exception\AMQPTimeoutException** exception.
463+
The `idle_timeout_exit_code` specifies what exit code should be returned by the consumer when the idle timeout occurs. Without specifying it, the consumer will throw an `PhpAmqpLib\Exception\AMQPTimeoutException` exception.
464464

465465
```yaml
466466
consumers:
@@ -543,7 +543,7 @@ used for arguments autowiring based on declared type and argument name. This all
543543
example to:
544544

545545
```php
546-
public function indexAction($name, ProducerInteface $uploadPictureProducer)
546+
public function indexAction($name, ProducerInterface $uploadPictureProducer)
547547
{
548548
$msg = array('user_id' => 1235, 'image_path' => '/path/to/new/pic.png');
549549
$uploadPictureProducer->publish(serialize($msg));
@@ -557,12 +557,12 @@ argument name. `upload_picture_producer` producer key would also be aliased to `
557557
It is best to avoid names similar in such manner.
558558

559559
All producers are aliased to `OldSound\RabbitMqBundle\RabbitMq\ProducerInterface` and producer class option from
560-
configuration. In sandbox mode only ProducerInterface aliases are made. It is highly recommended to use ProducerInterface
560+
configuration. In sandbox mode only `ProducerInterface` aliases are made. It is highly recommended to use `ProducerInterface`
561561
class when type hinting arguments for producer injection.
562562

563-
All consumers are aliased to 'OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface' and '%old_sound_rabbit_mq.consumer.class%'
563+
All consumers are aliased to `OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface` and `%old_sound_rabbit_mq.consumer.class%`
564564
configuration option value. There is no difference between regular and sandbox mode. It is highly recommended to use
565-
ConsumerInterface when type hinting arguments for client injection.
565+
`ConsumerInterface` when type hinting arguments for client injection.
566566

567567

568568
### Callbacks ###
@@ -621,7 +621,7 @@ And that's it!
621621
### Audit / Logging ###
622622

623623
This was a requirement to have a traceability of messages received/published.
624-
In order to enable this you'll need to add "enable_logger" config to consumers or publishers.
624+
In order to enable this you'll need to add `enable_logger` config to consumers or publishers.
625625

626626
```yaml
627627
consumers:
@@ -633,7 +633,7 @@ consumers:
633633
enable_logger: true
634634
```
635635
636-
If you would like you can also treat logging from queues with different handlers in monolog, by referencing channel "phpamqplib"
636+
If you would like you can also treat logging from queues with different handlers in monolog, by referencing channel `phpamqplib`.
637637

638638
### RPC or Reply/Response ###
639639

@@ -689,7 +689,7 @@ The arguments we are sending are the __min__ and __max__ values for the `rand()`
689689

690690
The final piece is to get the reply. Our PHP script will block till the server returns a value. The __$replies__ variable will be an associative array where each reply from the server will contained in the respective __request\_id__ key.
691691

692-
By default the RPC Client expects the response to be serialized. If the server you are working with returns a non-serialized result then set the RPC client expect_serialized_response option to false. For example, if the integer_store server didn't serialize the result the client would be set as below:
692+
By default the RPC Client expects the response to be serialized. If the server you are working with returns a non-serialized result then set the RPC client `expect_serialized_response` option to false. For example, if the **integer_store** server didn't serialize the result the client would be set as below:
693693

694694
```yaml
695695
rpc_clients:
@@ -719,7 +719,7 @@ As you can guess, we can also make __parallel RPC calls__.
719719

720720
### Parallel RPC ###
721721

722-
Let's say that for rendering some webpage, you need to perform two database queries, one taking 5 seconds to complete and the other one taking 2 seconds –very expensive queries–. If you execute them sequentially, then your page will be ready to deliver in about 7 seconds. If you run them in parallel then you will have your page served in about 5 seconds. With RabbitMqBundle we can do such parallel calls with ease. Let's define a parallel client in the config and another RPC server:
722+
Let's say that for rendering some webpage, you need to perform two database queries, one taking 5 seconds to complete and the other one taking 2 seconds –very expensive queries–. If you execute them sequentially, then your page will be ready to deliver in about 7 seconds. If you run them in parallel then you will have your page served in about 5 seconds. With `RabbitMqBundle` we can do such parallel calls with ease. Let's define a parallel client in the config and another RPC server:
723723

724724
```yaml
725725
rpc_clients:
@@ -941,7 +941,7 @@ batch_consumers:
941941

942942
*Note*: If the `keep_alive` option is set to `true`, `idle_timeout_exit_code` will be ignored and the consumer process continues.
943943

944-
You can implement a batch consumer that will acknowledge all messages in one return or you can have control on what message to acknoledge.
944+
You can implement a batch consumer that will acknowledge all messages in one return or you can have control on what message to acknowledge.
945945

946946
```php
947947
namespace AppBundle\Service;
@@ -1013,9 +1013,8 @@ How to run the following batch consumer:
10131013
$ ./bin/console rabbitmq:batch:consumer batch_basic_consumer -w
10141014
```
10151015

1016-
Important: BatchConsumers will not have the -m|messages option available
1017-
Important: BatchConsumers can also have the -b|batches option available if you want to only consume a specific number of batches and then stop the consumer.
1018-
! Give the number of the batches only if you want the consumer to stop after those batch messages were consumed.!
1016+
Important: BatchConsumers will not have the `-m|messages` option available
1017+
Important: BatchConsumers can also have the `-b|batches` option available if you want to only consume a specific number of batches and then stop the consumer. Give the number of the batches only if you want the consumer to stop after those batch messages were consumed!
10191018

10201019
### STDIN Producer ###
10211020

0 commit comments

Comments
 (0)