-
Notifications
You must be signed in to change notification settings - Fork 713
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
[micro] Add API to read Reply subject from micro.Request
#1579
Comments
Hey @mcosta74. It's a good idea to add the ability to check reply subject, but I'm not sure about introducing a new interface... That would force us to also add v2 of Another idea would be to add a |
Hi @piotrpio , my need is to know if I need to prepare/Marshall the response or I can skip it because there isn't a Reply. So your 2nd option doesn't fit what I'm looking for. |
As I said, I'll be happy to implement the change of the proposal is accepted |
@piotrpio Can I just add a |
Fixes nats-io#1579 Signed-off-by: Massimo Costa <[email protected]>
@piotrpio I commented on the PR as well, but for our purpose, sometimes we hand messages around multiple services or handlers before responding to a client, and need to be able to pass the reply subject to the down-line code. Easy to do with |
@mcosta74, @themartorana Sorry it took so long and thank you for the patience. We discussed it internally and agreed that we will not consider adding public methods to interfaces a breaking change for the client. We have done it in the past with I'll review your PR in a moment, on first glance it looks simple and straightforward enough 😉 |
Fixes #1579 Signed-off-by: Massimo Costa <[email protected]>
Fixes #1579 Signed-off-by: Massimo Costa <[email protected]>
Fixes #1579 Signed-off-by: Massimo Costa <[email protected]>
Fixes #1579 Signed-off-by: Massimo Costa <[email protected]>
Fixes #1579 Signed-off-by: Massimo Costa <[email protected]>
Proposed change
To not introduce a breaking change we'd need to add a new interface (
RequestV2
??) that extends theRequest
and add a new methodUse case
In some cases you can trigger a microservice but you don't care about the results so maybe you just send a publish instead of a request.
In this case would be nice to know if a request has a reply subject just to avoid to Marshal a response and try to send back it
Contribution
I'm interested to help with implementation in case this will be accepted
The text was updated successfully, but these errors were encountered: