Open tonysm opened 6 years ago
I've created a demo repository so you can reproduce it, if you want to: https://github.com/tonysm/laravel-ratchet-zmq-echo
Hey @tonysm, I was trying to make your little app work, I couldn't, but have you noticed that the log is saving the socket property as null?
In your example, and my environment log there is the following \"socket\":null
Taking into account that we're interacting with a socket server, should this be null or not?
Just trying to find a possible source of errors.
i am also facing same problem, any solution?
Yeah I'm having this issue as well .. maybe time to switch to a different package.
In the config changing publish method from \ZMQ::SOCKET_PUB to \ZMQ::SOCKET_PUSH made it work.
Hi there. Thanks for the effort on this package. I'm having an issue, don't know if you can help me here. I'm trying to use this package with
askedio/laravel-ratchet
andsimonhamp/echo
to broadcast events to the frontend, but it's not reaching it.Steps I've followed:
Install
askedio/laravel-ratchet
:Publish configs using
php artisan vendor:publish --provider="Askedio\LaravelRatchet\Providers\LaravelRatchetServiceProvider"
My local configs are:
config/ratchet.php
I start the server using the ZMQ option:
php artisan ratchet:serve --driver=WsServer -z
, I see this output:Install the
simonhamp/echo
package*resources/assets/js/bootstrap.js
I don't see any issue in the console. And the output in the terminal makes me think the connection works:
I'm adding the zmq connection to the broadcasting config and setting the env
BROADCAST_DRIVER=zmq
, as described in the docs.The Problem
I have an event:
app/Events/NewMessage.php
And a command to feed in some messages:
app/Console/SendMessages.php
and I can call it with
php artisan app:messages
. I see no error, which means it might be working.I also have the
ExampleComponent
rendering in the welcome.blade.php :resources/views/welcome.blade.php
The app layout comes from Laravel's auth scaffolding, which includes the compiled JS and CSS files. The example component looks like this:
I see no error. I tried to debug, but everything looks fine. The
config/zmq.php
file has this:The logs say the message is being sent, but nothing reaches the front-end.
storage/logs/laravel.log
Am I doing anything wrong here?
Again, thanks for the effort! Sorry to bother!