Replies: 1 comment
-
/cc @alesj, @cescoffier, @ozangunalp |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
I'm designing a notification service that is responsible for sending about 1 million emails per day. The emails are sent based on a priority field(location) provided by the clients using this new service i'm working on. That is, different clients will send a REST API call with an email address and the users' location, then the notification service will prioritize the messages based on the users' location according to configuration, which basically means some priority queue needs to be utilized. Due to some constraints, I've decided to use kafka to implement the priority queue based on the following implementation: https://www.confluent.io/blog/prioritize-messages-in-kafka/. So, right after the message is received from the client, it is sent to kafka topic. Later on, a different process/thread will consume the ordered messages from the kafka topic and send them to another service which will send the email to the end user. My confusion is whether using a different process, which basically means creating a new service/job to consume the ordered messages, or using the same process and consuming the messages on a different thread - well, this is actually what happens out of the box if i'll consume the messages in the notification service i'm creating. Since i'm using quarkus-smallrye-reactive-messaging-kafka dependency, i assume the framework will be able to handle multiple api calls concurrently by using the io threads efficiently, so consuming the messages in the same process seems to be the right thing. Regarding the numbers, I'm expecting to receive about a couple of millions REST API calls per day. Only one million emails will be sent per day according to priority, and all the rest will be pushed back for the next days.
I hope i've managed to explain it properly. Waiting for your suggestions :)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions