Closed settermjd closed 3 years ago
@settermjd The way you initialize and call looks correct to me! I have no experience myself with using the RabbitMq version, but that should run just fine.
$this->queuePluginManager->get('default')
This is the correct way to get access to the queue. So it really should respond with a queue instance.
and for the most part everything works just fine
Do you mean you can actually run jobs from the queue? But it will only fail when you programmatically try to access the queue?
Are you sure you load this part of the configuration? Could you for example test if chaning the RabbitMqQueueFactory
part to some rubish, or simply adding a typo to this PHP file will change the execution?
return [ 'slm_queue' => [ 'queue_manager' => [ 'factories' => [ 'default' => \SlmQueueRabbitMq\Factory\RabbitMqQueueFactory::class, ] ] ] ];
Let me know! Would love to help.
I'm trying to use the library, along with
rnd-cosoft/slm-queue-rabbitmq
with a Mezzio application, and for the most part everything works just fine. However, when I try to retrieve the default queue, or any queue, from the QueuePluginManager, I'm unable to. I get two errors, depending on what I try to do:I get this one if I use a string name, such as "default".
I get the following error if I use an existing
*Queue
class, such as by caling$queue = $this->queuePluginManager->get(RabbitMqQueue::class)
.As a bit of background:
$queuePluginManager
is instantiated as follows:Here is the relevant section of slm_queue.global.php:
And here are (most of) the applications dependencies: