Protocol
The sample will be using Simple Binary Encoding generated messages. This allows the sample to focus on the RPC flow, and keep the code simple with limited noise from building zero-copy messages.
Note that while the interaction will appear similar to RPC, it will be stream oriented. To allow outbound requests to be associated with the inbound responses, the protocol includes a correlation field.
Note
SBE Tool generates the message codecs from the XML message definition. For this code to be generated, you will need to run the build. This can be done by cloning the repository, and running gradlew
.
Connect Request
The connect request includes the necessary URI and Stream for the server to open a return publication:
1 2 3 4 |
|
Request
The request method accepts a correlation, which will be returned unmodified in the associated response, plus the parameter toReverse
.
1 2 3 4 |
|
Response
The request method returns a correlation, along with the reversed result.
1 2 3 4 |
|
The full definition of the messages can be found on GitHub.