feat(executor/rabbitmq): Add support for RPC #798
Merged
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.
Description
Introduced new client type to use for testing RPC pattern using Direct Reply-to.
This can not be achieved using existing client types (publisher and subscriber), because a Direct reply-to has some specific requirements and the client must have a reply consumer running before publishing a request.
The new client type is simply referred to as 'client' to indicate a client-server communication using RPC pattern.
It can be used to test a server that is expected to respond to the received message by sending a reply using Direct Reply-to feature of RabbitMQ.
Usage
Example testsuite:
In the above example, a direct-reply-to consumer will first be started and then a message will be published to the exchange using the provided routing key. Then, the test executor will wait for the reply to be received on the direct reply queue. Existing logic of the subscriber client type will be used to parse the results, close the connection and validate against assertions.