最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to send symfony rabbitmq message, using "type: headers" option? - Stack Overflow

programmeradmin6浏览0评论

In my messnger.yaml configuration there are "type: headers" settings that breaks the code. If I cnage it to "direct" everything works fine. My php code is here:

        $message = new OrderMessage(['a' => 'b']);

        $this->messageBus->dispatch($message, [
            new AmqpStamp(null, AMQP_NOPARAM, [ 
                'content_type' => 'orderTransport',
            ]),
            new TransportNamesStamp('simplest_transport'),
        ]);

Php reaches this place fine and don't throw any error.

I tried to change flag from AMQP_NOPARAM to AMQP_EX_TYPE_HEADERS but that doesn't work

发布评论

评论列表(0)

  1. 暂无评论