public function publish(string
$body, array
$headers =
[], int
$delayInMs = 0, AmqpStamp
$amqpStamp = null
): void
{ $this->
clearWhenDisconnected();
if ($this->autoSetupExchange
) { $this->
setupExchangeAndQueues(); // also setup normal exchange for delayed messages so delay queue can DLX messages to it
} if (0 !==
$delayInMs) { $this->
publishWithDelay($body,
$headers,
$delayInMs,
$amqpStamp);
return;
} $this->
publishOnExchange( $this->
exchange(),
$body,
$this->
getRoutingKeyForMessage($amqpStamp),
$headers,
$amqpStamp );
}