import { Message as sqsMessage } from "@aws-sdk/client-sqs";
import { handler, handlerFactory } from "./handler";
import Context from "../context/context";
export interface PollerPoolConfig {
    sqsEndpoint: string;
    region: string;
    maxConcurrency: number;
    pollerVisibilityTimeout?: number;
    maxMessages: number;
    messageAttributeNames?: Array<string>;
    sequentialMessageProcessig?: boolean;
}
export declare class PollerPool {
    private pollers;
    constructor(config: PollerPoolConfig, handler: handlerFactory);
    run(): void;
    useMiddlewares: (middlewares: ((ctx: Context, message: sqsMessage) => Context)[]) => void;
}
interface PollerConfig {
    region: string;
    endpoint: string;
    visibilityTimeout: number;
    sequentialMessageProcessig?: boolean;
    maxMessages: number;
    messageAttributeNames?: Array<string>;
}
export declare class Poller {
    private client;
    private config;
    private handler;
    private failedCount;
    private id;
    private middlewares;
    constructor(id: string, config: PollerConfig, handler: handler);
    Id: () => string;
    setMiddlewares: (middlewares: ((ctx: Context, message: sqsMessage) => Context)[]) => void;
    start: (ctx: Context) => void;
    private run;
    pull: (ctx: Context) => Promise<boolean>;
    private ackResults;
}
export {};
