Skip to content

Commit 5fba0d4

Browse files
committed
allows to work without message_id
1 parent 0c1ca4a commit 5fba0d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Jobs/AMQPJob.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,14 @@ public function getQueue()
125125
* Get the job identifier.
126126
*
127127
* @return string
128-
* @throws \OutOfBoundsException
129128
*/
130129
public function getJobId()
131130
{
132-
return $this->amqpMessage->get('message_id');
131+
try {
132+
return $this->amqpMessage->get('message_id');
133+
} catch (\OutOfBoundsException $exception){
134+
return null;
135+
}
133136
}
134137

135138
}

0 commit comments

Comments
 (0)