arobson / rabbot

Deprecated: Please see https://github.com/Foo-Foo-MQ/foo-foo-mq
MIT License
277 stars 129 forks source link

Multiple Connections with JSON configuration #114

Closed felixheck closed 6 years ago

felixheck commented 6 years ago

Hi there!

I‘m currently thinking about replacing amqplib with rabbit and was wondering what’s the best way to handle multiple connections (different rabbitmqs) with the JSON config? Just calling configure multiple times with the different configuration objects?😊

Thanks a lot!

luddd3 commented 6 years ago

I don't think rabbit would be a good fit for that. Also, consider that the maintainer haven't had any activity in about six months.

felixheck commented 6 years ago

@luddd3 What’s your suggestion/recommendation for easy to set up, high performance and flexible amqp lib?

luddd3 commented 6 years ago

I would write a thin wrapper around amqplib or use something based on it with active development. Currently I use rabbit for some projects, but I would be hesitant to recommend it to new users.

felixheck commented 6 years ago

@luddd3 Tried amqplib-easy but it's performance is horrible. It just handles up to 1500 msg/s...rabbot up to 14000 msg/s.

And I don't wanna reinvent the wheel. So if there're any existing high performance wrappers with active maintenance, let me know :)

luddd3 commented 6 years ago

Ok, I don't know if that lib does something special to kill performance, but I would expect them to be similar since both rabbit and amqplib-easy depend on amqplib to handle the communication with rabbitmq.

arobson commented 6 years ago

@felixheck - yep, just use multiple configure calls - you'll get a different promise for each. Since each connection and follow up set of topology operations is a stack of promises, I think you'll be happier treating each as a separate configure call.

Version 2 is out now and I hope to publish some follow up changes later today or tomorrow to address outstanding issues/requests.