shlomiassaf / pebula-node

A collection of libraries for node
MIT License
6 stars 7 forks source link

topic subscription handlerOptions not working #5

Closed bradoyler closed 4 months ago

bradoyler commented 3 years ago

Hi @shlomiassaf, I'm using this code within a controller

  @Subscription<MethodDecorator>({
    name: 'my-subscription',
    receiveMode: ReceiveMode.peekLock,
    topicName: 'my-topic',
    handlerOptions: {
      autoComplete: false,
      maxConcurrentCalls: 1,
    },
  })
  async topicUpdates(@Ctx() context: SbContext) {
    console.log(context.getData());
  }

I receive the message, but it is still removed from the topic subscription, even though I am using autoComplete: false and never call context.getMessage().complete() Trying to understand why this might be happening. Thanks.

bradoyler commented 3 years ago

@shlomiassaf I am using peer dependency @azure/service-bus@1.1.10