Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 784 Bytes

queue.md

File metadata and controls

22 lines (17 loc) · 784 Bytes

Event Queue

EventBus immediately publish the event, but sometimes you need to delay the publishing of the event and for this you can use the interface of the queue.

interface EventQueue
{
    public function publish(Event $event);
}

The publishing interface is general, and the interface for obtaining events from the queue depends on the implementation of the queue system.

We offer two options for implementing queues:

  • Pull - Pull queue is designed to explicitly pull events from the queue. You can do this on a timer through cron;
  • Subscribe - Subscribe queue is designed for asynchronous work. The handler is called only when the message is published in the queue.