3
b2plane
185d

Is it normal to use rabbitmq AND kafka in the same backend?

Rabbitmq for email verification, password reset etc and all that email bullshit handling

While kafka handles real time chat communication?

Since i noticed both of them work exactly the same. Producer/consumer. Pub/sub shit. Cant tell the difference other than a slightly different syntax

Comments
  • 1
    Hmm, can't imagine why not. If it works, it's not worth a penny to change it
  • 1
    @retoor it works. But im asking is it an overkill to use both or should 1 be enough to handle both emails + real time chatting?
  • 1
    I mean it all depends on what you're doing. But you'd be surprised how much you can do with a simple db
  • 1
  • 2
    I'm not an expert, but I don't think kafka is a message QUEUE while rabbitmq is.

    It's possible each was chosen for individual tasks that they're each better at on purpose. It's more likely to be some opinionated tech debt nonsense though.
  • 4
    Kafka is a little different because subscribers don’t take messages from the queue in a way that removes them when they’re delivered.
    Instead each subscriber maintains a pointer to where they are in the queue.

    So if you were to start up a whole new subscriber, it would start at the beginning of the event stream and get messages other subscribers have already read.
  • 0
    @TrevorTheRat the point is
  • 0
    @b2plane yeah I’d say I’d overkill too
  • 2
    "email bullshit handling" - not really a bullshit area. It is very important for your users to know what happened unless you are spamming shit

    RabbitMQ is good for read/process exactly once behaviour whereas Kafka is good for read and process as many times as you wish behaviour

    You may not see a need for both in the current system but there could be a possibility where one is more suitable than the other for some cases. E.g. let's say you need a guarantee that a message won't be last/dropped if there's a consumer error. In that case, RabbitMQ is less reliable as the message is read off the memory/disk. Kafka is a good reliable storage based Messaging Broker. And performance wise, Kafka is supposed to be good at throughput without hogging your memory at higher loads. You may want to test your system with both of these brokers and see which one is actually more performant for your use cases. I would say you prefer Kafka over RabbitMQ but it is too hard to declare that as an outsider
  • 0
    some people. all they do is talk about shitting, eat hot chip, and lie.

    btw has the shitting killed you yet or no?

    My god man, theres doctors for that!
Add Comment