'JetStream: How to make Push Subscription with Durable consumer? (i get "No interest")

I try to make Durable and Delivery consumer, but i get "No Interest" as result.

  1. It is "Active" When i create PushSubscribeOptions like this:

    PushSubscribeOptions pso = PushSubscribeOptions.Builder()

             .WithDurable(options?.DurableName)
              .WithStream(options?.StreamName)
             .Build();
         IJetStreamPushAsyncSubscription sub =
             _js.PushSubscribeAsync(options?.Subject, someHandler, true, pso);
    
  2. It is "No interest" when i use this code:

    PushSubscribeOptions pso = PushSubscribeOptions.Builder()

             .WithDurable(options?.DurableName)
             .WithStream(options?.StreamName)
             .WithDeliverGroup(options?.DeliveryGroup)
             .Build();
    
         IJetStreamPushAsyncSubscription sub =
             _js.PushSubscribeAsync(options?.Subject, someHandler, true, pso);
    

So , i am confuse.

How to make Push subscription with Delivery+Durable options?



Solution 1:[1]

Start the subscriber before you create the push consumer. At least in go, the no-interest is only an optimization (why transmit on a topic no one is subscribing on), and there it will start to push as soon as the is a subscriber ON THE PUSH TOPIC

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Thomas