basis-company / nats.php

nats jetstream client for php
126 stars 30 forks source link

[question] How do I wait for request-reply messages effectively? #60

Open ljfreelancer88 opened 8 months ago

ljfreelancer88 commented 8 months ago

In Gearman, you can do while ($worker->work()). Is it possible to have this approach, if applicable? Instead of doing...

while (true) {
    $client->process();
}

Though i stumbled $client->process(30 * 60) and $configuration->setDelay(0.001) I have no idea if it achieve similar to Gearman approach.