Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More configuration options requested #92

Closed
haayman-imagem opened this issue Oct 7, 2020 · 10 comments
Closed

More configuration options requested #92

haayman-imagem opened this issue Oct 7, 2020 · 10 comments

Comments

@haayman-imagem
Copy link

Right now I'm missing options to more finegrained configuration of the message queues. Some behaviour I'd like to change are:

  • When I'm running multiple instances of -say- an email-handler and I notice that both handlers get the message resulting in multiple mails. How to prevent this

  • When I send a message while there's no process listening to that message it is discarded. Isn't the whole idea of message queues that messages can sit in the queue patiently until they're handled? I'm quite surprised about this behaviour and would like to have some options to override this

@adenhertog
Copy link
Contributor

adenhertog commented Oct 7, 2020 via email

@haayman-imagem
Copy link
Author

Hi Andrew,

The email handler was just an example. But what if I have some heavy load service that I want to have horizontally scaled? I'd like to be able to start up a bunch of handlers that each get assign a message round-robin. Isn't that a valid use case that should be possible?

@adenhertog
Copy link
Contributor

adenhertog commented Oct 7, 2020 via email

@haayman-imagem
Copy link
Author

That's just it: each instance gets the message but I'd like only one instance to get the message. I'm afraid I'm only a newby concerning message queueing but I expect that it's possible to configure that a message is sent to a single queue and the first handler pops the message from the queue so the other handlers don't get it.
What I saw was that a message got handled by multiple instances.

More info maybe: I was running the apps on different machines. The 'sending' app was using messageQueue name 'app1' and both receiving apps were using messageQueue name 'app2' (the real names are hidden for privacy reasons). Could this be the reason why both app2 apps were interfering with each other?

@haayman-imagem
Copy link
Author

btw out of curiosity and highly offtopic: are you Dutch?

@adenhertog
Copy link
Contributor

adenhertog commented Oct 7, 2020 via email

@haayman-imagem
Copy link
Author

it's not a problem that two apps share the same queue name? This morning I fixed a bug where app1 and app2 both used the same queue name and although both were connected I got the message there weren't any handlers so the messages got dropped (case 2 in the original post, so that's solved now). So I don't know what happens exactly when 2 apps use the same queueName but it appears that is causing troubles

@haayman-imagem
Copy link
Author

I'm afraid my code is too complicated atm to serve as an example

@adenhertog
Copy link
Contributor

adenhertog commented Oct 7, 2020 via email

@valdestron
Copy link

valdestron commented Sep 14, 2021

Yes, each application needs its own dedicated queue. Each instance of an application should share the same queue as it's other instances. I hope I'm understanding your question correctly

On Wed, 7 Oct 2020, 21:07 Arjen Haayman, @.***> wrote: it's not a problem that two apps share the same queue name? This morning I fixed a bug where app1 and app2 both used the same queue name and although both were connected I got the message there weren't any handlers so the messages got dropped (case 2 in the original post, so that's solved now). So I don't know what happens exactly when 2 apps use the same queueName but it appears that is causing troubles — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#92 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOAR7MCK5CGMLZEYNFV46DSJRDWXANCNFSM4SHBU4LA .

What about postgres ? I have the same setup and postgres module is failing to save/retrieve data from the database, always erroring, because of race condition that happens when multiple containers handles messages and tries to save or upsert workflow data.

issue #134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants