我使用 Symfony 2.1.8 和 RabbitMqBundle。
我正在尝试像这样添加routing_keys参数config.yml:
old_sound_rabbit_mq:
connections:
    default:
        host:      'localhost'
        port:      5672
        user:      'guest'
        password:  'guest'
        vhost:     '/'
producers:
    twitter_metrics:
        connection: default
        exchange_options: {name: 'social-networks', type: topic}
consumers:
    twitter_metrics:
        connection: default
        exchange_options:
            name: 'social-networks'
            type: topic
        queue_options:
            name: 'twitter-metrics-queue'
            routing_keys:
              - 'metrics.twitter'
        callback: twitter_metrics_service
我尝试只在消费者和生产者中添加routing_keys参数和变体。producers但是当我尝试使用 symfony2 控制台时,我得到了这个:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
“old_sound_rabbit_mq.consumers.twitter_metrics.queue_options”下无法识别的选项“routing_keys”
我做错了什么?