@@ -63,8 +63,8 @@ public function push($job, $data = '', $queue = null)
6363 $ this ->createPayload ($ job , $ this ->getQueue ($ queue ), $ data ),
6464 $ queue ,
6565 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 );
6868 }
6969 );
7070 }
@@ -382,7 +382,7 @@ protected function createMessage($payload, int $attempts = 2): array
382382 'delivery_mode ' => AMQPMessage::DELIVERY_MODE_PERSISTENT ,
383383 ];
384384
385- $ currentPayload = json_decode ($ payload , true , 512 , JSON_THROW_ON_ERROR );
385+ $ currentPayload = json_decode ($ payload , true , 512 );
386386 if ($ correlationId = $ currentPayload ['id ' ] ?? null ) {
387387 $ properties ['correlation_id ' ] = $ correlationId ;
388388 }
@@ -415,13 +415,10 @@ protected function createMessage($payload, int $attempts = 2): array
415415 protected function publishProperties ($ queue , array $ options = []): array
416416 {
417417 $ queue = $ this ->getQueue ($ queue );
418- // @todo move to config
419- $ attempts = 3 ;
418+ $ attempts = Arr::get ($ options , 'attempts ' ) ?: 0 ;
420419
421420 $ destination = $ queue ;
422421 $ exchange = $ queue ;
423-
424- // @todo move to config
425422 $ exchangeType = AMQPExchangeType::TOPIC ;
426423
427424 return [$ destination , $ exchange , $ exchangeType , $ attempts ];
0 commit comments