laravel-zeromq
laravel-zeromq copied to clipboard
Laravel-Lumen + ZeroMQ not receiving ANY events
I'm trying to use laravel-zeromq with bitcoind on laravel-lumen framework. Already installed composer-package and setup for config, ServiceProvider and Alias.
But after starting CLI-Command which should output some events, the script just silently loops through reactPHP loop-object and does nothing ...
My test code looks as follows:
$loop = ZeroMQ()->connection('default')->subscribe(
['hashblock', 'hashtx'],
function($blockhash, $sequence) {
dd($blockhash);
printf(
"New block %u found. Contains %u transactions.\n",
$block['height'],
$block->count('tx')
);
}
);
$loop->addPeriodicTimer(0.5, function () {
echo "Still alive ...";
});
$loop->run();
The periodic-timer function is repeatingly executed. But there is no event received.
I already checked the culprid is nothing else. I've tested this nodejs-lib using example/sub.js and it works out of the box.