Skip to content

Commit 1b90a2a

Browse files
committed
fix doc
1 parent cfaae78 commit 1b90a2a

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

docs/guide/send_message.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Let's define the terms:
2525

2626
Next you need to configure and run **Consumer** and then send messages.
2727

28+
<br>
2829

2930
**Config:**
3031
-------------------------------
@@ -38,22 +39,38 @@ $config = \Simple\Queue\Config::getDefault()
3839
->withSerializer(new \Simple\Queue\Serializer\SymfonySerializer());
3940
```
4041

41-
4242
<br>
4343

44-
**Example of message sending:**
44+
**Create connection:**
4545
-------------------------------
4646

47+
Create a new connection:
48+
4749
```php
4850
$connection = \Doctrine\DBAL\DriverManager::getConnection([
4951
'driver' => 'pdo_sqlite',
5052
'path' => '/db/queue.db'
5153
]);
5254
```
5355

56+
or
57+
58+
```php
59+
$connection = \Doctrine\DBAL\DriverManager::getConnection([
60+
'dbname' => 'my_db',
61+
'user' => 'root',
62+
'password' => '*******',
63+
'host' => 'localhost',
64+
'port' => '54320',
65+
'driver' => 'pdo_pgsql',
66+
]);
67+
```
68+
69+
[See more information.](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html)
70+
5471
<br>
5572

56-
**Example of message sending:**
73+
**Send a message to queue :**
5774
-------------------------------
5875

5976
```php
@@ -78,7 +95,7 @@ You can send a message from anywhere in the application to process it in the bac
7895

7996
<br>
8097

81-
**Example of message sending through job:**
98+
**Send a message to queue through job:**
8299
-------------------------------
83100

84101
```php

0 commit comments

Comments
 (0)