/** * Kafka Trigger Node - Version 1.2 * Consume messages from a Kafka topic */ export interface KafkaTriggerV12Params { /** * Name of the queue of topic to consume from */ topic?: string | Expression | PlaceholderValue; /** * ID of the consumer group */ groupId?: string | Expression | PlaceholderValue; /** * Whether to use Confluent Schema Registry * @default false */ useSchemaRegistry?: boolean | Expression; /** * URL of the schema registry * @displayOptions.show { useSchemaRegistry: [true] } */ schemaRegistryUrl?: string | Expression | PlaceholderValue; options?: { /** Whether to allow sending message to a previously non-existing topic * @default false */ allowAutoTopicCreation?: boolean | Expression; /** The consumer will commit offsets after resolving a given number of messages * @default 0 */ autoCommitThreshold?: number | Expression; /** The consumer will commit offsets after a given period, for example, five seconds * @hint Value in milliseconds * @default 0 */ autoCommitInterval?: number | Expression; /** Number of messages to process in each batch, when set to 1, message-by-message processing is enabled * @default 1 */ batchSize?: number | Expression; /** Whether to auto resolve offsets for each batch * @default false */ eachBatchAutoResolve?: boolean | Expression; /** Maximum amount of data the server should return for a fetch request. In bytes. Default is 1MB. Higher values allow fetching more messages at once. * @default 1048576 */ fetchMaxBytes?: number | Expression; /** Minimum amount of data the server should return for a fetch request. In bytes. Server will wait up to fetchMaxWaitTime for this amount to accumulate. * @default 1 */ fetchMinBytes?: number | Expression; /** Controls how often the consumer sends heartbeats to the broker to indicate it is still alive. Must be lower than Session Timeout. Recommended value is approximately one third of the Session Timeout (for example: 10s heartbeat with 30s session timeout). * @hint Value in milliseconds * @default 10000 */ heartbeatInterval?: number | Expression; /** Heartbeats are used to ensure that the consumer's session stays active * @hint The value must be set lower than Session Timeout * @default 3000 */ heartbeatInterval?: number | Expression; /** The maximum number of unacknowledged requests the client will send on a single connection * @default 1 */ maxInFlightRequests?: number | Expression; /** Whether to read message from beginning * @default true */ fromBeginning?: boolean | Expression; /** Whether to try to parse the message to an object * @default false */ jsonParseMessage?: boolean | Expression; /** Whether to keep message value as binary data for downstream processing (e.g., Avro deserialization) * @default false */ keepBinaryData?: boolean | Expression; /** Whether to process messages in parallel resolving offsets independently or in order resolving offsets after execution completion. In the manual mode, when execution started by clicking on Execute Workflow or Execute Step button, messages are processed in parallel resolving offsets immediately. * @default true */ parallelProcessing?: boolean | Expression; /** Number of Kafka partitions to process in parallel. Controls how many partitions are processed concurrently by the consumer. * @hint Set to 0 to process all partitions sequentially * @default 0 */ partitionsConsumedConcurrently?: number | Expression; /** Whether to return only the message property * @displayOptions.show { jsonParseMessage: [true] } * @default false */ onlyMessage?: boolean | Expression; /** Whether to return the headers received from Kafka * @default false */ returnHeaders?: boolean | Expression; /** The maximum time allowed for a consumer to join the group * @default 600000 */ rebalanceTimeout?: number | Expression; /** Delay in milliseconds before retrying after a failed offset resolution. This prevents rapid retry loops that could overwhelm the Kafka broker. * @hint Value in milliseconds * @displayOptions.hide { /resolveOffset: ["immediately"] } * @default 5000 */ errorRetryDelay?: number | Expression; /** Timeout in milliseconds used to detect failures. Has to be higher than Heartbeat Interval. During the workflow execution heartbeat will be sent periodically to keep the session alive with configured Heartbeat Interval. * @hint Value in milliseconds * @default 30000 */ sessionTimeout?: number | Expression; }; } export interface KafkaTriggerV12Credentials { kafka: CredentialReference; } interface KafkaTriggerV12NodeBase { type: 'n8n-nodes-base.kafkaTrigger'; version: 1.2; credentials?: KafkaTriggerV12Credentials; isTrigger: true; } export type KafkaTriggerV12ParamsNode = KafkaTriggerV12NodeBase & { config: NodeConfig; }; export type KafkaTriggerV12Node = KafkaTriggerV12ParamsNode;