该文档publish
建议根据 AMQP 规范将额外的 AMQP 属性作为关键字参数传递给as,但correlationId="foo"
似乎没有达到预期的效果。
问问题
824 次
1 回答
1
如果你 grep 源代码,你可以看到Kombu 自己填写相关 ID 调用的地方publish
,在kombu.common.send_reply
:
producer.publish(
msg, exchange=exchange,
retry=retry, retry_policy=retry_policy,
**dict({'routing_key': req.properties['reply_to'],
'correlation_id': req.properties.get('correlation_id'),
'serializer': serializers.type_to_name[req.content_type],
'content_encoding': req.content_encoding}, **props)
)
correlation_id
是使用的 kwarg 的名称。
于 2013-11-20T02:32:03.067 回答