21 'mtmh.queue.1.consumer',
22 'mtmh.queue.2.consumer',
28 private $topicValueMap = [
29 'mtmh.topic.1' =>
'mtmh.topic.1',
30 'mtmh.topic.2' => [
'mtmh.topic.2-1',
'mtmh.topic.2-2']
36 private $expectedValues = [
37 'string-mtmh.topic.1',
39 'array-mtmh.topic.2-1',
40 'array-mtmh.topic.2-2',
41 'mixed-mtmh.topic.2-1',
42 'mixed-mtmh.topic.2-2' 51 public function testAsynchronousRpcCommunication()
53 foreach ($this->topicValueMap as $topic =>
$data) {
55 if (is_array(
$data)) {
58 $testObject = $this->objectManager->create(AsyncTestData::class);
59 $testObject->setValue(
$value);
60 $testObject->setTextFilePath($this->logFilePath);
64 $testObject = $this->objectManager->create(AsyncTestData::class);
65 $testObject->setValue(
$data);
66 $testObject->setTextFilePath($this->logFilePath);
69 $this->publisher->publish($topic,
$message);
75 foreach ($this->expectedValues as
$item) {
waitForAsynchronousResult($expectedLinesCount, $logFilePath)