|
@ -33,7 +33,8 @@ class Publisher extends Command |
|
|
echo PHP_EOL; |
|
|
echo PHP_EOL; |
|
|
|
|
|
|
|
|
for ($index = 1; $index <= (int) $this->option('count'); $index++) { |
|
|
for ($index = 1; $index <= (int) $this->option('count'); $index++) { |
|
|
$payload = rand(1,100) <= 20 ? "finish" : "Message #$index"; |
|
|
|
|
|
|
|
|
$chance = rand(1, 100); |
|
|
|
|
|
$payload = $chance <= 20 ? "finish #$index" : ($chance <= 40 ? "requeue #$index" : "Message #$index"); |
|
|
|
|
|
|
|
|
$message = [ |
|
|
$message = [ |
|
|
'content_type' => 'text/plain', |
|
|
'content_type' => 'text/plain', |
|
@ -78,7 +79,7 @@ class Publisher extends Command |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
$message = new ProducibleMessage( |
|
|
$message = new ProducibleMessage( |
|
|
message: json_encode($payload), |
|
|
|
|
|
|
|
|
message: $payload, |
|
|
properties: $publish + $message, |
|
|
properties: $publish + $message, |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|