Skip to content

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

@stayfuneral

Description

@stayfuneral

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions