Giter VIP home page Giter VIP logo

laravel-zeromq's People

Contributors

denpamusic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

laravel-zeromq's Issues

Failed to bind the ZMQ: No such device

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?

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.

Can't subscribe to bitcoin core topics

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.