-
Notifications
You must be signed in to change notification settings - Fork 5
RPC high level constructs #59
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The happy path works. The server can connect to a queue and responds messages if the request's replyTo property is set.
RPC Tests were refactored to extract common setup code into a before each node.
A test that verifies that custom correction ID and custom post processor are called by the server.
The test for RpcServer.Close() was returning too soon. The simplest solution is an ugly sleep of 1 second.
RPC server construct provides an utility to pause the message processing. This relies on the ability to "drain" credits, and issue new credits at a later point to unpause. This commit exposes that functionality internally.
The RPC server now can be constructred from the AMQP connection. Tests were refactored to use this contructor, instead of manually setting up publishers and consumers.
Because setting the reply-to address in the post-processor forces the users of custom post-processors to remember/add a line to set the reply-to address always. By setting the reply-to prior to the post-processor, the user has the option to modify the reply-to before sending, if desired. By setting the reply-to prior to post-processor, we free up some cognitive load on the users who wish to use a custom post-processor.
Closed
Refactor pointer-to functions: one generic function to rule them all
The automatic reconnection was racy. It could try to open a connection at the same time that `Close()` was called on `AmqpConnection`. This required introducing an internal field to determine when the connection is "closed", and a specific error to signal in the reconnection that the connection is "closed" after calling `Close()`.
CorrectionID -> CorrelationID Sometimes AI doesnt get it right
I've doing chaos testing of the RPC constructs, and it doesn't handle at all the connection dropping. Since this PR is already quite large (+1800 lines), I'm inclined to add automatic reconnection in a follow up PR. |
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Sumary
This PR adds high level constructs for RPC communication.
Additional changes
Pending work