New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alias NextMsg to Fetch for Pull Subscribers #754
Conversation
I tried to make changes in the test as little and not-confusing as possible. Let me know if it's good enough. |
7339f63
to
4605b8d
Compare
Thanks will take a look! |
Based on user feedback and issues such as #785 it seems that might help to make |
@wallyqs Except that with Fetch() you could pass options that you can't with NextMsg(). Maybe it is better to fail for pull subscriptions (what I do in C), to make it clear that this is not a regular sync subscription. But I could be convinced otherwise. |
But the options for |
@wallyqs Well, in the C client, and maybe the Go client if we update the implementation, the pull subscription will use a sync subscription, so in a way I prevent the user from calling NextMsg(), since i use that internally by sending MSG.NEXT request with the reply subject of the sync sub was created on. The difference is that Fetch() is going to "filter out" the status messages possibly sent by the server. Now, I realize that I am mudding things up: if the intent is to have NextMsg() for a pull subscribe to basically do:
then I guess I am fine with that. |
I'm against conflating NextMsg and Fetch. Also, Fetch is a "macro" that sets up a pull and does the NextMsg for the user. All 3 varieties of pull require the user to call NextMsg. It seems to me that this concept is getting lost |
I just spend some time myself scratching my head trying to figure out why How about instead of aliasing it to |
I apologize for the delay but we have decided to make calling NextMsg() on a pull subscription an error (you need to call Fetch). The error will be |
Addresses #747