简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM