You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I'd like to thank you for that great work on this library. It seems very promising. I'm currently testing it because I'm fed up of Symfony Messenger. I've been using messaging libraries for a while now:
tactician
simplebus
prooph
event sauce
messenger
php-amqplib/RabbitMqBundle
...
I really want to use your lib for my next professional projects.
To be honest, it's pretty hard to understand how it works out of the box by reading the documentation :/
I'll list some feedbacks about my misunderstanding! :)
1/ For Symfony, what is the difference between an enqueue.processor and enqueue.transport.processor? In which case should I use one instead of the other?
If I tag a service with enqueue.processor and run enqueue:transport:consume then, I'll get an error because it's incompatible
If I tag a service with enqueue.transport.processor and run enqueue:consume then, I'll get an error because it's incompatible
My thought is that enqueue:transport:consume enables to handle a message from a given queue with a given processor even if the processor is not configured on that queue. enqueue:consume will select the appropriate queue binded processor to handle that message
2/ I want to dispatch commands or events using async. For commands, while reading the documentation, I thought the only way to do it, was to use enqueue/async-command library. But it is not. I'm able to async send commands and consume those later using enqueue:consume with an SQS client.
I think, you should make a clear distinction between Producer sending commands/events and cases when we need to use async-command
3/ Configuration
I'm using the symfony bridge. I want to declare a queue named "place-order" for my transport named "sqs"
When I run enqueue:setup-broker then it perfectly creates a queue named "dev-place-order" into SQS.
Now, let's say I want to manually register a processor on that queue by tagging it. If I rerun enqueue:setup-broker, then it will create another queue named dev-default:
/app # bin/console enqueue:setup-broker -vvv
[debug] [SqsDriver] Declare router queue: dev-place-order
[debug] [SqsDriver] Declare processor queue: dev-default
Broker set up
As your you can see, It creates a queue named dev-default only because I've tagged my processor. I don't want that. So following the documentation, I have to specify a queue name tag, e.g:
That will work. But I've debugged the source code and it will actually make a HTTP request to AWS SQS for creating this queue which already exist:
/app # bin/console enqueue:setup-broker -vvv
[debug] [SqsDriver] Declare router queue: dev-place-order
[debug] [SqsDriver] Declare processor queue: dev-place-order
Broker set up
So... I must define the client key in a transport, otherwise an exception will be raised. If I don't want any default queue to be created, I have to define router_queue in client with my queue name.
If I wanna manually register a processor and if I don't want a default queue to be created, I have to define the queue tag.
How can I avoid that double queue creation?
4/ Multiple queues on a same transport
Let's say I want only one transport (SQS) with N queues (queue1, queue2, queue3). Should I do that?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hey,
First of all, I'd like to thank you for that great work on this library. It seems very promising. I'm currently testing it because I'm fed up of Symfony Messenger. I've been using messaging libraries for a while now:
I really want to use your lib for my next professional projects.
To be honest, it's pretty hard to understand how it works out of the box by reading the documentation :/
I'll list some feedbacks about my misunderstanding! :)
1/ For Symfony, what is the difference between an
enqueue.processorandenqueue.transport.processor? In which case should I use one instead of the other?enqueue.processorand runenqueue:transport:consumethen, I'll get an error because it's incompatibleenqueue.transport.processorand runenqueue:consumethen, I'll get an error because it's incompatibleMy thought is that
enqueue:transport:consumeenables to handle a message from a given queue with a given processor even if the processor is not configured on that queue.enqueue:consumewill select the appropriate queue binded processor to handle that message2/ I want to dispatch commands or events using async. For commands, while reading the documentation, I thought the only way to do it, was to use
enqueue/async-commandlibrary. But it is not. I'm able to async send commands and consume those later usingenqueue:consumewith an SQS client.I think, you should make a clear distinction between Producer sending commands/events and cases when we need to use
async-command3/ Configuration
I'm using the symfony bridge. I want to declare a queue named "place-order" for my transport named "sqs"
When I run
enqueue:setup-brokerthen it perfectly creates a queue named "dev-place-order" into SQS.Now, let's say I want to manually register a processor on that queue by tagging it. If I rerun
enqueue:setup-broker, then it will create another queue nameddev-default:Configuration:
Command output:
As your you can see, It creates a queue named
dev-defaultonly because I've tagged my processor. I don't want that. So following the documentation, I have to specify a queue name tag, e.g:That will work. But I've debugged the source code and it will actually make a HTTP request to AWS SQS for creating this queue which already exist:
So... I must define the
clientkey in a transport, otherwise an exception will be raised. If I don't want any default queue to be created, I have to definerouter_queueinclientwith my queue name.If I wanna manually register a processor and if I don't want a default queue to be created, I have to define the
queuetag.How can I avoid that double queue creation?
4/ Multiple queues on a same transport
Let's say I want only one transport (SQS) with N queues (queue1, queue2, queue3). Should I do that?
If so, I found it pretty confusing to get 3 different clients for the same transport to achieve this.
I'm more expecting something like:
Thanks!
All reactions