PHPackages                             slims/queue - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. slims/queue

ActiveLibrary[Queues &amp; Workers](/categories/queues)

slims/queue
===========

SLiMS Library to manage asyncronous task with message broker

v1.0.0(2y ago)07GPL-3.0PHPPHP ^8.1

Since Jan 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/goslims/queue)[ Packagist](https://packagist.org/packages/slims/queue)[ RSS](/packages/slims-queue/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

SLiMS Queue
===========

[](#slims-queue)

A SLiMS component to manage queue processes. You can provide your handler, please read handler standart in `src/Handlers/`.

How to
------

[](#how-to)

### install

[](#install)

```
composer require slims/queue
```

### Produce

[](#produce)

```
use SLiMS\Queue\Manager as Queue;

Queue::produce('your message/formatter task etc'); // default topic is slims

// or

Queue::produce('your message/formatter task etc', topic: 'csv_process');
```

### Consume

[](#consume)

```
use SLiMS\Queue\Manager as Queue;

Queue::consume(topic: 'slims', callback: function($message){
    // write your code here
});

// with channel name

Queue::setChannel('worker1')->consume(topic: 'slims', callback: function($message){
    // write your code here
});
```

### Config

[](#config)

Queue config available in `config/queue.php`

```
