Add multi request to KafkaRequestReply
#2761
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This PR adds a new request type to the
KafkaRequestReply
so that we can receive multiple replies to a request.This can be useful when you want to send a request, for which multiple consumer groups can answer, or a some service needs to answer with multiple messages.
That was not supported with the
Uni<Rep> request
.Implementation
This is a first idea to add the feature, in which the
KafkaRequestReplyImpl
is modified to use aMulti
as a base for all operations instead of theUni
.If you think this should be a separate, class or if you have any other idea, do not hesitate.
This adds two new methods
requestMulti
that returns aMulti<Rep>
.I had no idea, for the method names, and we can discuss a better one.
The
reply.timeout
is applied between each reply, and theReplyFailureHandler
is called for each reply, so one failure on a reply will fail the whole operation.I didn't write the doc yet.
If you have any input feel free.