@@ -63,8 +63,8 @@ public function push($job, $data = '', $queue = null)
63
63
$ this ->createPayload ($ job , $ this ->getQueue ($ queue ), $ data ),
64
64
$ queue ,
65
65
null ,
66
- function ($ payload , $ queue ) use ( $ data ) {
67
- return $ this ->pushRaw (payload: $ payload , queue: $ queue );
66
+ function ($ payload , $ queue ) {
67
+ return $ this ->pushRaw ($ payload , $ queue );
68
68
}
69
69
);
70
70
}
@@ -382,7 +382,7 @@ protected function createMessage($payload, int $attempts = 2): array
382
382
'delivery_mode ' => AMQPMessage::DELIVERY_MODE_PERSISTENT ,
383
383
];
384
384
385
- $ currentPayload = json_decode ($ payload , true , 512 , JSON_THROW_ON_ERROR );
385
+ $ currentPayload = json_decode ($ payload , true , 512 );
386
386
if ($ correlationId = $ currentPayload ['id ' ] ?? null ) {
387
387
$ properties ['correlation_id ' ] = $ correlationId ;
388
388
}
@@ -415,13 +415,10 @@ protected function createMessage($payload, int $attempts = 2): array
415
415
protected function publishProperties ($ queue , array $ options = []): array
416
416
{
417
417
$ queue = $ this ->getQueue ($ queue );
418
- // @todo move to config
419
- $ attempts = 3 ;
418
+ $ attempts = Arr::get ($ options , 'attempts ' ) ?: 0 ;
420
419
421
420
$ destination = $ queue ;
422
421
$ exchange = $ queue ;
423
-
424
- // @todo move to config
425
422
$ exchangeType = AMQPExchangeType::TOPIC ;
426
423
427
424
return [$ destination , $ exchange , $ exchangeType , $ attempts ];
0 commit comments