キューの作成
キューを作成する際には、以下のように指定します。 maxInflight そして msgPerSecond パラメータを使用する。これらを併用することで、デキューレートをコントロールすることができる。
メソッド署名
createQueue(queueName: string, callback: string, options: ICreateQueueOptions)
種類
CreateQueueOptions:
maxInflightNumbers) 同時に実行できるタスクの数。msgPerSecond: (Numbers) コールバック・エンドポイントに送信される、1秒あたりのタスク数。active: (ブール)trueは、ジョブが追加されるとすぐに処理を開始するようにキューを設定します。
キューの作成
await queue.createQueue('queue', 'execute', {
maxInflight: 10,
msgPerSecond: 100,
active: true
});
options = CreateQueueOptions()
options.maxInflight = 10
options.msgPerSecond = 100
options.active = true
await queue.createQueue('queue', options)