Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getRoutingKeyForMessage example
}
if
(
0 !==
$delayInMs
)
{
$this
->
publishWithDelay
(
$body
,
$headers
,
$delayInMs
,
$amqpStamp
)
;
return
;
}
$this
->
publishOnExchange
(
$this
->
exchange
(
)
,
$body
,
$this
->
getRoutingKeyForMessage
(
$amqpStamp
)
,
$headers
,
$amqpStamp
)
;
}
/** * Returns an approximate count of the messages in defined queues. */
public
function
countMessagesInQueues
(
)
: int
{
return
array_sum
(
array_map
(
fn
(
$queueName
)
=>
$this
->
queue
(
$queueName
)
->
declareQueue
(
)
,
$this
->
getQueueNames
(
)
)
)
;
}