MAKS\AmqpAgent\Worker\Consumer::work
Executes `self::connect()`, `self::queue()`, `self::qos()`, `self::consume()`, `self::wait()`, and `self::disconnect()` respectively.
Signature
Parameters
$callback
—
object
- The callback that the consumer should use to process the messages (same as `self::consume()`).
Returns
- void
Errors/Exceptions
-
AmqpAgentException
Defined by Interface
WorkerFacilitationInterface
Test Coverage
Information
- Coverage: 7/7 Lines (100%)
- Tests: 2
- Passed: 2 (100%)
Tests
- [ PASSED ] — MAKS\AmqpAgent\Tests\Worker\ConsumerTest::testConsumingMessagesFromRabbitMQServerViaWorkMethod
- [ PASSED ] — MAKS\AmqpAgent\Tests\Worker\ConsumerTest::testWorkRaisesAnExceptionIfUnexpectedParameterIsPassed