Class TestProducer
Test Producer
Captures messages instead of sending them to a queue.
Namespace: Cake\Queue\TestSuite\Transport
Property Summary
-
$deliveryDelay protected
int|nullDelivery delay
-
$priority protected
int|nullPriority
-
$timeToLive protected
int|nullTime to live
Method Summary
-
getDeliveryDelay() public
Get delivery delay
-
getPriority() public
Get priority
-
getTimeToLive() public
Get time to live
-
send() public
Send message
-
setDeliveryDelay() public
Set delivery delay
-
setPriority() public
Set priority
-
setTimeToLive() public
Set time to live
Method Detail
send() ¶ public
send(Destination $destination, Message $message): void
Send message
Parameters
-
Destination$destination Destination
-
Message$message Message
Returns
voidsetDeliveryDelay() ¶ public
setDeliveryDelay(?int $deliveryDelay = null): Interop\Queue\Producer
Set delivery delay
The delivery delay is in milliseconds. Use null to unset delivery delay and use transport's mode
Parameters
-
?int$deliveryDelay optional Delay in milliseconds
Returns
Interop\Queue\ProducersetPriority() ¶ public
setPriority(?int $priority = null): Interop\Queue\Producer
Set priority
Use null to unset priority and use transport's mode
Parameters
-
?int$priority optional Priority
Returns
Interop\Queue\ProducersetTimeToLive() ¶ public
setTimeToLive(?int $timeToLive = null): Interop\Queue\Producer
Set time to live
The message time to live to be used, in milliseconds; a value of zero means that a message never expires. Use null to unset time to live and use transport's mode
Parameters
-
?int$timeToLive optional Time to live in milliseconds
Returns
Interop\Queue\Producer