UNPKG

@ydbjs/topic

Version:

YDB Topics client for publish-subscribe messaging. Provides at-least-once delivery, exactly-once publishing, FIFO guarantees, and scalable message processing for unstructured data.

26 lines 717 B
export class TopicMessage { partitionSession; producer; payload; codec; seqNo; offset; uncompressedSize; createdAt; writtenAt; metadataItems; constructor(options) { this.partitionSession = new WeakRef(options.partitionSession); this.producer = options.producer; this.codec = options.codec; this.seqNo = options.seqNo; this.offset = options.offset ?? 0n; this.payload = options.payload; this.uncompressedSize = options.uncompressedSize ?? 0n; } get alive() { const session = this.partitionSession.deref(); return session ? !session.isStopped : false; } } //# sourceMappingURL=message.js.map