You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Joshua Estes edited this page Oct 4, 2017
·
3 revisions
Broker
The Broker allows you a central place to manage multiple queues. Once you initialize a Queue, you can add this to the Broker and use this to get any of the Queues.
Usage
<?phpuseDspacelabs\Component\Queue\Broker;
// Initialize the Broker object$broker = newBroker();
// ... initial multiple different queues ...// Add Queues to Broker$broker->addQueue($queueName);
$broker->addQueue($other);
// Publish a message to the "queue.name" queue$broker->get('queue.name')->publish($message);
// Publish a message to the "other" queue$broker->get('other')->publish($anotherMessage);