-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublisher.php
More file actions
20 lines (16 loc) · 851 Bytes
/
publisher.php
File metadata and controls
20 lines (16 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
require __DIR__ . "/vendor/autoload.php";
$amqpConnection = \SimplyCodedSoftware\IntegrationMessaging\Amqp\AmqpConnectionFactory::create()
->setUsername("guest")
->setPassword("guest")
->setHost("rabbitmq")
->setVirtualHost("/");
$amqpQueue = \SimplyCodedSoftware\IntegrationMessaging\Amqp\AmqpQueueBuilder::createWithDirectExchangeBinding("test", "amqp_connection_factory", "matching", "")
->withMessageAck(true)
->withQueueDurability(true)
->withMessageConverterReferenceNames([])
->registerQueueOnInitialization(false)
->build(\SimplyCodedSoftware\IntegrationMessaging\Handler\InMemoryReferenceSearchService::createWith([
"amqp_connection_factory" => $amqpConnection
]));
$amqpQueue->send(\SimplyCodedSoftware\IntegrationMessaging\Support\MessageBuilder::withPayload('["test"]')->build());