Lack of control with PushSubscribeAsync #722
Unanswered
SkinnySackboy
asked this question in
Q&A
Replies: 2 comments
-
Start() is called for you. I think you maybe used to recent .net async versus what this client actually does. But for now, once the consumer and subscription exist, the server starts pushing data. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks. Do you think it could make sense in the future to support something like this? var pushSubscribeOptions = new PushSubscribeOptions.PushSubscribeOptionsBuilder()
.WithManualStart(true) // This would allow me to call Start when I decide. Default is false for backward compatibility
.Build();
var asyncSubscription = m_jetStreamContext.PushSubscribeAsync(subject, NATSSubscriptionHandler, true, pushSubscribeOptions);
// Now I can call this
asyncSubscription.Start(); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We have got the following code, which (minus the last line which appears not to do anything) works.
Is there any way for me to call PushSubscribeAsync to create the subscription, but to maintain control over when I can call start, rather than having the subscription start receiving messages immediately?
I tried checking if there is some manual mode I can opt in to but I cannot see anything obvious that I'm missing.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions