@@ -106,10 +106,8 @@ public function push($job, $data = '', $queue = null)
106106 $ this ->createPayload ($ job , $ this ->getQueue ($ queue ), $ data ),
107107 $ queue ,
108108 null ,
109- function ($ payload , $ queue ) use ($ job ) {
110- return $ this ->pushRaw ($ payload , $ queue , [
111- 'job ' => $ job
112- ]);
109+ function ($ payload , $ queue ) {
110+ return $ this ->pushRaw ($ payload , $ queue );
113111 }
114112 );
115113 }
@@ -121,11 +119,11 @@ function ($payload, $queue) use ($job) {
121119 */
122120 public function pushRaw ($ payload , $ queue = null , array $ options = []): int |string |null
123121 {
124- [$ destination , $ exchange , $ exchangeType , $ attempts, $ job ] = $ this ->publishProperties ($ queue , $ options );
122+ [$ destination , $ exchange , $ exchangeType , $ attempts ] = $ this ->publishProperties ($ queue , $ options );
125123
126124 $ this ->declareDestination ($ destination , $ exchange , $ exchangeType );
127125
128- [$ message , $ correlationId ] = $ this ->createMessage ($ payload , $ attempts, $ job );
126+ [$ message , $ correlationId ] = $ this ->createMessage ($ payload , $ attempts );
129127
130128 $ this ->publishBasic ($ message , $ exchange , $ destination , true );
131129
@@ -513,7 +511,7 @@ public function reject(RabbitMQJob $job, bool $requeue = false): void
513511 /**
514512 * Create a AMQP message.
515513 */
516- protected function createMessage ($ payload , int $ attempts = 0 , string $ job = null ): array
514+ protected function createMessage ($ payload , int $ attempts = 0 ): array
517515 {
518516 $ properties = [
519517 'content_type ' => 'application/json ' ,
@@ -544,8 +542,6 @@ protected function createMessage($payload, int $attempts = 0, string $job = null
544542 $ message = new AMQPMessage ($ payload , $ properties );
545543
546544 $ message ->set ('application_headers ' , new AMQPTable ([
547- 'rr_job ' => $ job ,
548- 'rr_id ' => $ correlationId ,
549545 'laravel ' => [
550546 'attempts ' => $ attempts ,
551547 ],
0 commit comments