UNPKG

@message-queue-toolkit/amqp

Version:
28 lines 1.14 kB
import { AbstractAmqpPublisher } from "./AbstractAmqpPublisher.js"; import { ensureExchange } from "./utils/amqpQueueUtils.js"; export class AbstractAmqpTopicPublisher extends AbstractAmqpPublisher { constructor(dependencies, options) { super(dependencies, { ...options, creationConfig: { exchange: options.exchange, updateAttributesIfExists: false, }, exchange: options.exchange, locatorConfig: undefined, }); } publishInternal(message, options) { // biome-ignore lint/style/noNonNullAssertion: <explanation> this.channel.publish(this.exchange, options.routingKey, message, options.publishOptions); } resolveTopicOrQueue() { // biome-ignore lint/style/noNonNullAssertion: <explanation> return this.exchange; } async createMissingEntities() { // biome-ignore lint/style/noNonNullAssertion: <explanation> await ensureExchange(this.connection, this.channel, this.creationConfig, this.locatorConfig); } } //# sourceMappingURL=AbstractAmqpTopicPublisher.js.map