import type { Id } from '../identifier.utils.js'; import type { CommandResponse, ClientProvider } from '../../client/client.type.js'; import { type Consumer } from '../offset/offset.utils.js'; import { type PollingStrategy, type PollMessagesResponse } from './poll.utils.js'; /** Internal result used when a group member currently owns no partitions. */ export declare const NO_ASSIGNED_PARTITION = 4294967294; /** * Parameters for the poll messages command. */ export type PollMessages = { /** Stream identifier */ streamId: Id; /** Topic identifier */ topicId: Id; /** Consumer configuration */ consumer: Consumer; /** Partition ID (null for all partitions) */ partitionId: number | null; /** Strategy for selecting messages */ pollingStrategy: PollingStrategy; /** Maximum number of messages to poll */ count: number; /** Whether to auto-commit offset after polling */ autocommit: boolean; }; /** * Poll messages command definition. * Retrieves messages from a topic partition. */ export declare const POLL_MESSAGES: { code: number; serialize: ({ streamId, topicId, consumer, partitionId, pollingStrategy, count, autocommit }: PollMessages) => Buffer; deserialize: (r: CommandResponse) => { partitionId: number; currentOffset: bigint; count: number; messages: import("./poll.utils.js").Message[]; }; }; /** * Executable poll messages command function. */ export declare const pollMessages: (getClient: ClientProvider) => (request: PollMessages) => Promise; //# sourceMappingURL=poll-messages.command.d.ts.map