You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,9 @@ QUEUE_DRIVER=sqs-plain
100
100
If you plan to push plain messages from Laravel or Lumen, you can rely on DispatcherJob:
101
101
102
102
```php
103
+
namespace App\Http\Controllers\Api;
104
+
105
+
use App\Http\Controllers\Controller;
103
106
use Dusterio\PlainSqs\Jobs\DispatcherJob;
104
107
105
108
class ExampleController extends Controller
@@ -140,9 +143,12 @@ If a third-party application is creating custom-format JSON messages, just add a
140
143
implement a handler class as follows:
141
144
142
145
```php
146
+
namespace App\Jobs;
147
+
143
148
use Illuminate\Contracts\Queue\Job as LaravelJob;
149
+
use Illuminate\Queue\Jobs\Job;
144
150
145
-
class HandlerJob extends Job
151
+
class HealthCheckHandler extends Job
146
152
{
147
153
protected $data;
148
154
@@ -158,10 +164,15 @@ class HandlerJob extends Job
158
164
// Raw JSON payload from SQS, if necessary
159
165
var_dump($job->getRawBody());
160
166
}
161
-
}
162
167
168
+
public function getRawBody() {}
169
+
170
+
public function getJobId() {}
171
+
}
163
172
```
164
173
174
+
Please note, we are declaring the `getRawBody` and `getJobId` methods to satisfy the abstract class requirements. However, these are not used when processing messages.
0 commit comments