Closed miholeus closed 7 years ago
I have config
'rabbitmq' => [ 'class' => 'mikemadisonweb\rabbitmq\Configuration', 'connections' => [ 'default' => $params['rabbitmq'] ], 'producers' => [ 'queue_dispatcher' => [ 'connection' => 'default', 'exchange_options' => [ 'name' => 'queue.exchange', 'type' => 'topic', ], ], ],
In my controller I'm trying to get producer
$producer = \Yii::$container->get(sprintf(BaseRabbitMQ::PRODUCER_SERVICE_NAME, 'queue_dispatcher'));
And I get error
Class rabbit_mq.producer.queue_dispatcher does not exist
How can I get producer instance? Why producer is not registered in container?
I've figured out that I need to call $configuration->load(). That's embarrasing a little. I think it can not be done more elegant due to poor realization of di on yii :(
I have config
In my controller I'm trying to get producer
And I get error
How can I get producer instance? Why producer is not registered in container?