Replies: 1 comment
-
The pub-sub mechanism in RES, as of current version, is in-process. That is you publish an event and in the same process (let's say in web in Procfile) it is dispatched to a handler. In case of a synchronous handler it is executed in the very same process too. When your handler is asynchronous on the other hand, the queueing happens via ActiveJob and the handler is executed depending on the underlying AJ driver. In case of Sidekiq that would be an external Sidekiq process (worker in Procfile). If you have a working ActiveJob subsystem, nothing needs to be added. There's a possibility to skip ActiveJob subsystem — by having your own dispatcher/scheduler components and a client to consume scheduled events. Assuming the AJ subsystem is at-least-once (Sidekiq is), you need a way to ensure idempotency. Most likely the AJ subsystem will handle events without order guarantee, which has to be addressed as well. |
Beta Was this translation helpful? Give feedback.
-
I'm most familiar with a classic Heroku setup where all server processes are declared in a Procfile (web, workers, potentially multiple workers instances dedicated to a particular Sidekiq queue), and I'm curious about RES.
I've read these docs on subscribing to events, but I'm confused as to what process(es) (web, workers, etc) are actually going to be subscribing to queues. So, a few questions:
Beta Was this translation helpful? Give feedback.
All reactions