我正在尝试使用php-enqueue包发送一个标头我正在尝试这个:
public function __construct(
ProducerInterface $producer
)
{
parent::__construct();
$this->producer = $producer;
}
//... Inside function...
$m = new Message(
'message to send',
[],
[
'm' => 1
]
);
$this->producer->sendCommand('newMessageFromApi', $m);
但是头并没有到达消费者。这些是唯一到达的头。
[
"content_type" => "text/plain",
"delivery_mode" => 2,
"message_id" => "38f96af0-64de-4a31-9315-6b51dd5f8baf",
"timestamp" => 1652027271
]
1条答案
按热度按时间wbgh16ku1#
试试这个