MAKS\AmqpAgent\RPC\ClientEndpoint::request
Sends the passed request to the server using the passed queue.
Signature
Parameters
$request
—
object
- The request body or an `AMQPMessage` instance.
$queueName
—
string
- [optional] The name of queue to send through.
Returns
- string
- The response body.
Errors/Exceptions
-
RPCEndpointException
- If the client is not connected yet or if request Correlation ID does not match the one of the response.
Defined by Interface
ClientEndpointInterface
Test Coverage
Information
- Coverage: 26/26 Lines (100%)
- Tests: 3
- Passed: 3 (100%)
Tests
- [ PASSED ] — MAKS\AmqpAgent\Tests\RPC\ClientEndpointTest::testRequestMethodViaAliasMethodCall
- [ PASSED ] — MAKS\AmqpAgent\Tests\RPC\ClientEndpointTest::testRequestMethodRaisesAnExceptionIfTheClientIsNotConnectedYet
- [ PASSED ] — MAKS\AmqpAgent\Tests\RPC\ClientEndpointTest::testAnExceptionIsRaisedIfCorrelationIdOfTheResponseIsNotTheSameAsTheRequest