Skip to content

Function: buildQueueOptions() ​

buildQueueOptions(options?): ComponentOptions<QueueOptions>

Build the options of a Queue component, for the components of an application.

Parameters ​

options? ​

QueueOptions

The driver, the defaults of the consumers, the results kept, the codec (all optional).

Returns ​

ComponentOptions<QueueOptions>

The component options.

Example ​

typescript
import {Application} from 'lakutata'
import {buildQueueOptions} from '@lakutata/queue'

Application.run(() => ({
    id: 'queue.app',
    name: 'QueueApp',
    components: {
        queue: buildQueueOptions({defaults: {attempts: 5, concurrency: 4}, results: {keep: '2h'}})
    }
}))

Released under the MIT License.