我正在centos 5.5的rabbitmq中测试c客户端。如果要使用扇出交换将消息推送到每个队列,应该如何设置参数routingkey?
函数amqp_basic_publish如下所示:
amqp_basic_publish(amqp_connection_state_t state,
amqp_channel_t channel,
amqp_bytes_t exchange,
amqp_bytes_t routing_key,
amqp_boolean_t mandatory,
amqp_boolean_t immediate,
amqp_basic_properties_t const *properties,
amqp_bytes_t body)使用扇出交换时,参数routing_key是否无意义?如果是这样,我应该将此参数设置为什么值?
感谢您的任何有用的建议!
发布于 2012-11-30 17:09:12
当您进行扇出交换时,路由键什么也不做,并且可以设置为任何值。
看一看here,它对不同的交换类型做了一个很好的总结。
https://stackoverflow.com/questions/13641643
复制相似问题