File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,40 @@ class HomePage implements RequestHandlerInterface
68
68
}
69
69
```
70
70
71
+ Create a Job Handler Action
72
+
73
+ ``` php
74
+ <?php
75
+
76
+ declare(strict_types=1);
77
+
78
+ namespace App;
79
+
80
+ use Antidot\Queue\JobPayload;
81
+
82
+ class SomeMessageTypeAction
83
+ {
84
+ public function __invoke(JobPayload $payload): void
85
+ {
86
+ // do some stuff with the job payload here.
87
+ }
88
+ }
89
+ ```
90
+
91
+ ``` yaml
92
+ services :
93
+ some_action_service :
94
+ class : App\SomeMessageTypeAction
95
+ parameters :
96
+ queues :
97
+ contexts :
98
+ default :
99
+ message_types :
100
+ # message_type: action_service
101
+ some_message_type : some_action_service
102
+ other_message_type : some_action_service
103
+ ` ` `
104
+
71
105
then start listening a queue:
72
106
73
107
` ` ` bash
You can’t perform that action at this time.
0 commit comments