-
Notifications
You must be signed in to change notification settings - Fork 211
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
initial bulk publish impl for java #789
Conversation
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
String contentType = entry.getContentType(); | ||
|
||
// Serialize event into bytes | ||
if (!Strings.isNullOrEmpty(contentType) && objectSerializer instanceof DefaultObjectSerializer) { |
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 a problem we need to fix in other places in the SDK. Using the default serializer should not trigger different behavior. It should be based on the content-type only.
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 a change that needs to be done SDK wide and not only for one api ... If it is is only changed here that might cause serialized events from this API to become incompatible with the other normal publish API ...
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.
Just a few questions / observations, mostly for my own edification - you don't need to block on them
sdk/src/main/java/io/dapr/client/domain/BulkPublishRequest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
The build failures here are wrt Config API changes which is handled in the PR #740. Locally also verified that the PubsubIT passes as expected .... |
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
sdk/src/main/java/io/dapr/client/domain/BulkPublishResponse.java
Outdated
Show resolved
Hide resolved
examples/src/main/java/io/dapr/examples/pubsub/bulk/BulkPublisher.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
sdk-tests/src/test/java/io/dapr/it/methodinvoke/grpc/MethodInvokeIT.java
Outdated
Show resolved
Hide resolved
As discussed offline, this PR only contains the gRPC implementation for Bulk Publish |
examples/src/main/java/io/dapr/examples/pubsub/bulk/KafkaSubscriber.java
Outdated
Show resolved
Hide resolved
*/ | ||
@Override | ||
public <T> Mono<BulkPublishResponse<T>> publishEvents(BulkPublishRequest<T> request) { | ||
return DaprException.wrapMono(new UnsupportedOperationException()); |
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.
I assume this will be implemented next, right?
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.
@artursouza as we discussed previously, we were saying that HTTP impl is not needed, and that HTTP Client is going to be deprecated. #790
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
@dapr/maintainers-java-sdk see the latest checks for this PR itself. It required only 2 runs. For some reason the Kafka subscription is flaky. Additionally I am seeing flakiness in other validations as well. Please see the logs |
@artursouza any updates on this PR? |
sdk/src/main/java/io/dapr/client/domain/BulkPublishResponse.java
Outdated
Show resolved
Hide resolved
sdk/src/main/java/io/dapr/client/domain/BulkPublishRequest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Changed the examples to use Redis, that removes the flakiness. |
Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #789 +/- ##
============================================
+ Coverage 77.62% 77.97% +0.35%
- Complexity 1161 1258 +97
============================================
Files 105 116 +11
Lines 3647 3887 +240
Branches 419 457 +38
============================================
+ Hits 2831 3031 +200
- Misses 603 625 +22
- Partials 213 231 +18
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@dapr/maintainers-java-sdk Had a discussion with @shubham1172 on whether to merge |
Signed-off-by: Mukundan Sundararajan 65565396+mukundansundar@users.noreply.github.com
Description
initial bulk publish implementation for Java SDK
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.
Since bulk subscribe is already implemented, this PR closes #778
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: