Skip to content

Commit 97fde57

Browse files
authored
Merge pull request vyuldashev#71 from stevenleeg/master
Sets correlation ID for later use
2 parents 57fddf0 + 37f839e commit 97fde57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/VladimirYuldashev/LaravelQueueRabbitMQ/Queue/RabbitMQQueue.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ public function pushRaw($payload, $queue = null, array $options = [])
9393

9494
// push job to a queue
9595
$message = new AMQPMessage($payload, $headers);
96+
$this->message->set('correlation_id', uniqid());
9697

9798
// push task to a queue
9899
$this->channel->basic_publish($message, $exchange, $queue);
99100

100-
return true;
101+
return $this->message->get('correlation_id');
101102
}
102103

103104
/**

0 commit comments

Comments
 (0)