Notification consumer configuration for PostgreSQL stream provider. Manages notification-based message consumption with fallback polling.

interface NotificationConsumer {
    callback: ((messages: StreamMessage[]) => void);
    consumerName: string;
    groupName: string;
    isListening: boolean;
    lastFallbackCheck: number;
    streamName: string;
}

Properties

callback: ((messages: StreamMessage[]) => void)

Callback function invoked when messages are available

consumerName: string

Unique name identifying this consumer

groupName: string

Name of the consumer group

isListening: boolean

Whether this consumer is actively listening for notifications

lastFallbackCheck: number

Timestamp of the last fallback check (used for periodic polling)

streamName: string

Name of the stream being consumed