php-enqueue/enqueue-dev

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

stayfuneral opened this issue · 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();