0

I am trying to send a header using php-enqueue bundle I'm trying this:

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);

But the header does not reach the consumer. These are the only headers that arrive.

[
      "content_type" => "text/plain",
      "delivery_mode" => 2,
      "message_id" => "38f96af0-64de-4a31-9315-6b51dd5f8baf",
      "timestamp" => 1652027271
]
1

1 Answer 1

0

Try this

$m = new Message('message to send',['m' => 1]);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.