Skip to content

Commit

Permalink
example timeout configuration setter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nekufa committed Mar 14, 2024
1 parent d22a579 commit c2231eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ echo count($messages);
// fetch all messages that are published to the subject client connection
// queue will stop message fetching when another subscription receives a message
// in advance you can time limit batch fetching
$queue->setLimit(1); // limit to 1 second
$queue->setTimeout(1); // limit to 1 second
$messages = $queue->fetchAll();

// reset subscription
Expand Down Expand Up @@ -250,7 +250,7 @@ $queue = $goodbyer->setBatching(50)->create()->getQueue();
// fetching 100 messages provides 2 stream requests
// limit message fetching to 1 second
// it means no more that 100 messages would be fetched
$messages = $queue->setLimit(1)->fetchAll(100);
$messages = $queue->setTimeout(1)->fetchAll(100);

$recipients = [];
foreach ($messages as $message) {
Expand Down

0 comments on commit c2231eb

Please sign in to comment.