File tree 1 file changed +21
-4
lines changed 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ Let's define the terms:
25
25
26
26
Next you need to configure and run ** Consumer** and then send messages.
27
27
28
+ <br >
28
29
29
30
** Config:**
30
31
-------------------------------
@@ -38,22 +39,38 @@ $config = \Simple\Queue\Config::getDefault()
38
39
->withSerializer(new \Simple\Queue\Serializer\SymfonySerializer());
39
40
```
40
41
41
-
42
42
<br >
43
43
44
- ** Example of message sending :**
44
+ ** Create connection :**
45
45
-------------------------------
46
46
47
+ Create a new connection:
48
+
47
49
``` php
48
50
$connection = \Doctrine\DBAL\DriverManager::getConnection([
49
51
'driver' => 'pdo_sqlite',
50
52
'path' => '/db/queue.db'
51
53
]);
52
54
```
53
55
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
+
54
71
<br >
55
72
56
- ** Example of message sending :**
73
+ ** Send a message to queue :**
57
74
-------------------------------
58
75
59
76
``` php
@@ -78,7 +95,7 @@ You can send a message from anywhere in the application to process it in the bac
78
95
79
96
<br >
80
97
81
- ** Example of message sending through job:**
98
+ ** Send a message to queue through job:**
82
99
-------------------------------
83
100
84
101
``` php
You can’t perform that action at this time.
0 commit comments