denpamusic / laravel-zeromq Goto Github PK
View Code? Open in Web Editor NEWFully unit-tested ZeroMQ driver for Laravel.
License: MIT License
Fully unit-tested ZeroMQ driver for Laravel.
License: MIT License
I've set up everything according to the documentation, that's been provided in this repo and I'm running into this issue.
ZMQSocketException
Failed to bind the ZMQ: No such device
I've downloaded php-zmq and libzmq v3, i have php 8.1.8 and laravel 9.1
How can I fix it?
Once i am listening to a topic via a service provider im unable to run php artisan package:discover --ansi it just runs out of memory. am i doing something wrong?
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.
I was running this code in tinker bitcoind()->on('rawtx',function($message){\Log::info($message);})
, after exit from tinker, the following errors are shown:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to Denpa\ZeroMQ\Connection::onSuccess() must be of the type string, array given, called in C:\Webapps\test.btc.com\vendor\denpa\laravel-zeromq\src\Connection.php on line 167 and defined in C:\Webapps\test.btc.com\vendor\denpa\laravel-zeromq\src\Connection.php:185 Stack trace: #0 C:\Webapps\test.btc.com\vendor\denpa\laravel-zeromq\src\Connection.php(16 7): Denpa\ZeroMQ\Connection->onSuccess(Array, Object(Closure), Object(React\ZMQ\SocketWrapper)) #1 C:\Webapps\test.btc.com\vendor\evenement\evenement\src\Evenement\EventEmitterTrait.php(123): Denpa\ZeroMQ\Connection->Denpa\ZeroMQ\{closure}(Array) #2 C:\Webapps\test.btc.com\vendor\react\zmq\src\SocketWrapper.php(94): Evenement\EventEmitter->emit('messages', Array) #3 C:\Webapps\test.btc.com\vendor\react\zmq\src\SocketWrapper.php(76): React\ZMQ\SocketWrapper->handleReadEvent() #4 C:\Webapps\test.btc.com\vendor\react\event-loop\src\StreamSelectLoop.php(245): React\ZMQ\SocketWrapper->handleEvent(Resour in C:\Webapps\test.btc.com\vendor\denpa\laravel-zeromq\src\Connection.php on line 185
Anyone know what's the problem here?
I am still new with ZeroMQ, so I need example how to integrate with UI, for example Chat
laravel-zeromq/src/Connection.php
Line 185 in 57b3782
Hi,
I think message must be mixed.
When it is string it will give us error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.