enqueue-dev icon indicating copy to clipboard operation
enqueue-dev copied to clipboard

[InvalidArgumentException] The malformed json given. Error 4 and message Syntax error

Open stayfuneral opened this issue 2 years ago • 0 comments

Hi, i download your library for usage in Bitrix framework, and on execution Consumer::recieve see errors:

[InvalidArgumentException] 
The malformed json given. Error 4 and message Syntax error (0)
/data/local/vendor/enqueue/rdkafka/JsonSerializer.php:32
#0: Enqueue\RdKafka\JsonSerializer->toMessage(string)
	/data/local/vendor/enqueue/rdkafka/RdKafkaConsumer.php:175
#1: Enqueue\RdKafka\RdKafkaConsumer->doReceive(integer)
	/data/local/vendor/enqueue/rdkafka/RdKafkaConsumer.php:115
#2: Enqueue\RdKafka\RdKafkaConsumer->receive()
	/data/1/index.php:18

Code:

$testQueue = $context->createQueue('test');


$consumer = $context->createConsumer($testQueue);
$message = $consumer->receive();

stayfuneral avatar Apr 06 '22 09:04 stayfuneral