-
Notifications
You must be signed in to change notification settings - Fork 207
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
Bi-direction subscription #1124
Conversation
@@ -145,6 +145,12 @@ | |||
<version>${dapr.sdk.version}</version> | |||
<scope>test</scope> | |||
</dependency> | |||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed for the tests to work on IntelliJ. Not sure why it is like that in master branch.
095e952
to
763fd6e
Compare
763fd6e
to
a7f834c
Compare
@artursouza @salaboy and @cicoyle my Dapr-fu is not that great yet, but for the streaming subscription, after enabling detailed logs I have gotten this stack trace:
NOTE: Here we have both |
Hmm interesting "Protocol message had invalid UTF-8" so it expects utf-8 but it's not getting that? Also, we have 1.14.4 by now, it might be worth upgrading to that. |
@artursouza I have finally figured out what is the issue. Currently in Java SDK we use the following proto files: https://raw.githubusercontent.com/dapr/dapr/v1.14.0-rc.2/dapr/proto. While in Dapr 1.14.+ runtime we use these: https://raw.githubusercontent.com/dapr/dapr/v1.14.{patch-version}/dapr/proto. Once I have used the protos for the latest Dapr release, I was able to consume messages in a streaming fashion using the Here are the differences: For v1.14.0-rc.2 we have:
For v1.14.+ we have:
As we can see the released version has a completely different type for streaming the response. This explains the deserialization exception that I have run into, since Dapr was returning Having all of the above, the question is what should be the value that we use in the parent POM for |
Correct. We should issue a patch release for the 1.12 Java SDK release. Let me cut a PR now. |
Add bidi subscription to validate workflow. Signed-off-by: Artur Souza <[email protected]>
a7f834c
to
ceded83
Compare
@artursouza I was reviewing your PR and as far as I can see you adopted a callback approach via
We already use The implementation that I am proposing should look something like this:
Please take a look and let me know your thoughts. |
I agree 100%. Although I am not a fan of project Reactor, I agree with the consistency. Let me give this a shot. |
I am trying this. The challenge for this is how to process the ack/retry/drop response from the client code. Any suggestions? |
Signed-off-by: Artur Souza <[email protected]>
I made a small change to make the subscription receive the status as a Mono in the listener, so it can be done async on the client side. I am happy to try another API. Remember that this is in the Preview interface, so we can change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation lgtm. glad to have consistency
Description
Bi-directional subscription.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1072
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: