apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.87k stars 224 forks source link

Events Not Being Dispatched to the subscribers #527

Open MailsonPrates opened 1 year ago

MailsonPrates commented 1 year ago

Hi,

Fusio version: 4.0.0 I followed this doc: https://docs.fusio-project.org/docs/backend/api/event

Everything seems to be fine, but the events are not dispatched to subscribers.

Main cron job is working: image

Event created: image

Endpoint configured and tested and assigned to subscriber: image

Action configured: image

Action code: image

May you guys help me, what can be wrong?

MailsonPrates commented 1 year ago

@chriskapp please, help me

chriskapp commented 1 year ago

Hi @MailsonPrates I would assume that you have setup Fusio manually or do you use our docker image? In case of manually setup you would need to run the consumer command s.

php bin/fusio messenger:consume

to consume the messages and trigger the requests. You can also check the messenger_messages table to see whether entries are available in the queue.

MailsonPrates commented 1 year ago

@chriskapp thanks for reply!

Yes, manual setup. Ok, I"ll execute this command. Is there anywhere I could read more about those commands?

chriskapp commented 1 year ago

no problem, we have introduced this command in the new Fusio 4.0 version, for this we have integrated the symfony/messenger component s. https://symfony.com/doc/current/messenger.html into Fusio, this is currently not correctly reflected at the docs but I will update the documentation once I find the time. In the meantime you can also imply run php bin/fusio help messenger:consume to see all available options. So you basically need to run this command either via cron or use a process control tool like supervisord s. https://symfony.com/doc/current/messenger.html#messenger-supervisor you can see this also at our docker image s. https://github.com/apioo/fusio-docker/blob/main/supervisor/fusio.conf#L2

MailsonPrates commented 1 year ago

Thank you so much!