1 | import * as SqsConsumer from 'sqs-consumer';
|
2 | export interface SqsWorkerConfigObject {
|
3 | |
4 |
|
5 |
|
6 | queueUrl?: string;
|
7 | region?: string;
|
8 | attributeNames?: Array<string>;
|
9 | handleMessage?: Function;
|
10 | batchSize?: number;
|
11 | |
12 |
|
13 |
|
14 | connectTimeout?: number;
|
15 | }
|
16 | export declare abstract class SqsHandler {
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 | abstract handle(message: Object, done: (err?: Error) => void): any;
|
23 | }
|
24 | export declare class SqsWorker {
|
25 | static startMethod: string;
|
26 | static stopMethod: string;
|
27 | static lazy: boolean;
|
28 | readonly maxRetries: number;
|
29 | configuration: SqsWorkerConfigObject;
|
30 | name: string;
|
31 | consumerCreator: (config: SqsWorkerConfigObject) => SqsConsumer;
|
32 | instance: SqsConsumer;
|
33 | handler: SqsHandler;
|
34 | constructor(configuration: SqsWorkerConfigObject, name: string);
|
35 | initialise(): void;
|
36 | shutdown(): void;
|
37 | getMaxRetries(): number;
|
38 | }
|