Skip to content

Commit 8289aea

Browse files
committed
producer examples
1 parent de01815 commit 8289aea

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

examples/producer.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@
2424
echo 'messageID ' . $messageID . "\n";
2525
}
2626

27-
// Sending messages asynchronously
28-
for ($i = 0; $i < 10; $i++) {
29-
$producer->sendAsync(sprintf('hello-async %d', $i), function (string $messageID) {
30-
echo 'messageID ' . $messageID . "\n";
31-
});
32-
}
33-
// Add this line when sending asynchronously
34-
$producer->wait();
35-
3627
// Sending delayed messages
3728
for ($i = 0; $i < 10; $i++) {
3829
$producer->send(sprintf('hello-delay %d', $i), [

0 commit comments

Comments
 (0)