ricbra / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
247 stars 49 forks source link

How can I retrieve serialized data from the queue ? #15

Closed tuttiflirty closed 9 years ago

tuttiflirty commented 9 years ago

My consumer launched as a command is sucessfully executed but I can not retrieve my serialized data, error for instance, they remain null.

protected function execute(InputInterface $input, OutputInterface $output)
    {
        $message = $input->getArgument('message');

        if (!$message = unserialize(base64_decode($message))) {
            throw new \InvalidArgumentException('Invalid input received');
        }

        $digest = unserialize($message);
        $error = $digest['error'];
        $source = $digest['source'];
...

Any ideas please?

tuttiflirty commented 9 years ago

It just works.