Domanda

The documentation suggests extra AMQP properties are passed as keyword arguments to publish as according to the AMQP spec, but correlationId="foo" does not seem to have the desired effect.

È stato utile?

Soluzione

If you grep the source, you can see a bit where Kombu itself fills out a correlation ID calling publish, in 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 is the name of the kwarg used.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top