Closed gunesyu closed 1 month ago
There seems to be a promise resolve issue about createSubscriber method that prevents consumerTag to return in success callback.
consumerTag
Is there any other way to retrieve the consumerTag to use for cancelling/resuming specific consumers?
public async createSubscriber<T>( handler: SubscriberHandler<T>, msgOptions: MessageHandlerOptions, originalHandlerName: string, consumeOptions?: ConsumeOptions ): Promise<SubscriptionResult> { return new Promise((res) => { let result: SubscriptionResult; this.selectManagedChannel(msgOptions?.queueOptions?.channel) .addSetup(async (channel) => { const consumerTag = await this.setupSubscriberChannel<T>( handler, msgOptions, channel, originalHandlerName, consumeOptions ); result = { consumerTag }; }) .then(() => { res(result); }); }); }
PS. I'd like to contribute by opening a pr that fixes this issue if the intended behavior is as expected.
There seems to be a promise resolve issue about createSubscriber method that prevents
consumerTag
to return in success callback.Is there any other way to retrieve the consumerTag to use for cancelling/resuming specific consumers?
PS. I'd like to contribute by opening a pr that fixes this issue if the intended behavior is as expected.