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.

30 lines 803 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.payload = options.payload; this.codec = options.codec; this.seqNo = options.seqNo; if (options.offset) { this.offset = options.offset; } if (options.uncompressedSize) { this.uncompressedSize = options.uncompressedSize; } } get alive() { const session = this.partitionSession.deref(); return session ? !session.isStopped : false; } } //# sourceMappingURL=message.js.map