Skip to content

Commit 344bd46

Browse files
committed
Laravel 5.7 queues compatibility
1 parent 409eb03 commit 344bd46

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Queue/KafkaQueue.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function size($queue = null)
8080
*/
8181
public function push($job, $data = '', $queue = null)
8282
{
83-
return $this->pushRaw($this->createPayload($job, $data), $queue, []);
83+
return $this->pushRaw($this->createPayload($job, $queue, $data), $queue, []);
8484
}
8585

8686
/**
@@ -98,6 +98,7 @@ public function pushRaw($payload, $queue = null, array $options = [])
9898
{
9999
try {
100100
$topic = $this->getTopic($queue);
101+
\Illuminate\Support\Facades\Log::debug('queue: ' . $queue);
101102

102103
$pushRawCorrelationId = $this->getCorrelationId();
103104

@@ -222,14 +223,14 @@ public function getConfig()
222223
* Create a payload array from the given job and data.
223224
*
224225
* @param string $job
225-
* @param mixed $data
226226
* @param string $queue
227+
* @param mixed $data
227228
*
228229
* @return array
229230
*/
230-
protected function createPayloadArray($job, $data = '', $queue = null)
231+
protected function createPayloadArray($job, $queue = null, $data = '')
231232
{
232-
return array_merge(parent::createPayloadArray($job, $data), [
233+
return array_merge(parent::createPayloadArray($job, $queue, $data), [
233234
'id' => $this->getCorrelationId(),
234235
'attempts' => 0,
235236
]);

0 commit comments

Comments
 (0)