RabbitMQ

RabbitMQ

Application and Data / Data Stores / Message Queue
Needs advice
on
RabbitMQRabbitMQSupervisordSupervisord
and
SymfonySymfony

Hello, I'm using Supervisord for separate process manager/consumer with RabbitMQ and Symfony but it's not working properly, it disconnects after a couple of hours.. and for a workaround, I'm using a restart job on Jenkins (as in the linked issue in GitHub) but tbh I would like to have a clean stack.. if anyone knows a better alternative than supervisord it will be awesome..

Many thanks!

READ MORE
Process stops processing messages after certain amount of time · Issue #28 · ricbra/rabbitmq-cli-consumer · GitHub (github.com)
13 upvotes·52.7K views
Replies (1)

I've had good experiences moving from Supervisord to using systemd for managing processes, especially for setups involving RabbitMQ and Symfony. Systemd not only integrates well with the system, offering better control and management, but it also simplifies logging through journalctl and handles automatic restarts seamlessly.

Here's what I did to make the switch: - Craft a Service File: I wrote a .service file in /etc/systemd/system/ to describe my service. It includes details on how to start and stop the process, among other things. - Set Up Service Behavior: Inside this file, I specified commands like ExecStart for launching my process, Restart to ensure it always restarts after failure, and set the User to define which user runs the process. - Enable and Launch the Service: With systemctl enable my-service.service, I made sure my service would start on boot, and systemctl start my-service.service got it running right away. - Manage and Log: Whenever I needed to check on things, journalctl was there for logs, and systemctl helped me manage the service (like checking its status or restarting it). - Switching to systemd resolved the disconnection issues I faced without needing any workarounds like restartingI've had good experiences moving from Supervisord to using systemd for managing processes, especially for setups involving RabbitMQ and Symfony. Systemd not only integrates well with the system, offering better control and management, but it also simplifies logging through journalctl and handles automatic restarts seamlessly.

Here's what I did to make the switch: - Craft a Service File: I wrote a .service file in /etc/systemd/system/ to describe my service. It includes details on how to start and stop the process, among other things. - Set Up Service Behavior: Inside this file, I specified commands like ExecStart for launching my process, Restart to ensure it always restarts after failure, and set the User to define which user runs the process. - Enable and Launch the Service: With systemctl enable my-service.service, I made sure my service would start on boot, and systemctl start my-service.service got it running right away. - Manage and Log: Whenever I needed to check on things, journalctl was there for logs, and systemctl helped me manage the service (like checking its status or restarting it). - Switching to systemd resolved the disconnection issues I faced without needing any workarounds like restart jobs. It felt like a cleaner, more reliable approach.

READ MORE
8 upvotes·3 comments·16K views
mwlazlo885
mwlazlo885
·
February 16th 2024 at 6:56PM

Many thanks for the recommendation! I will give it a try, thanks : )

·
Reply
bmspower websitedesigncompany
bmspower websitedesigncompany
·
June 4th 2024 at 7:43AM

Messenger provides a message bus with the ability to send messages and then handle them immediately in your application or to be handled later.

·
Reply
Vid Matehd
Vid Matehd
·
November 3rd 2024 at 7:51AM

Download VidMate App (APK) latest version 2025 in Official Website. VidMate App is the best video downloader for YT, Facebook and all other movie & video platforms.

https://vidmatehd.net/

·
Reply
Needs advice
on
KafkaKafka
and
RabbitMQRabbitMQ

I want to collect the dependency data that Java applications build in the maven tool by CI/CD tools. I want to know how to pick collection tech, and what is the pros and cons between Kafka an RabbitMQ.

Thanks!

READ MORE
3 upvotes·36.6K views
Associate Java Developer at txtsol·
Needs advice
on
JavaJavaKafkaKafka
and
Spring BootSpring Boot

Hi all, I'm working on a project where I have to implement Messaging queues in a project. I just need to know about your personal experience with these queues which is best (RabbitMQ or Kafka).

Thanks

READ MORE
3 upvotes·38.1K views
Technical operations Engineer ·
Needs advice
on
Node.jsNode.jsRabbitMQRabbitMQ
and
RedisRedis

I am developing a microservice architecture that necessitates service-to-service communication. Validating authorization using a token that is passed from the auth service to the other services is one of these needs. I'm thinking about using the RPC communication strategy with Redis or RabbitMQ. Any suggestions?

READ MORE
6 upvotes·49.4K views
Replies (1)
CTO/founder at Meet Kinksters·

I think you may be mixing concerns a bit. Also, the authentication mechanisms for various tools may not necessarily play well with another, and/or you may need different intra-service auth vs. public-facing/customer sessions/tokens. If you need to have disparate tools authenticate to one another with a bearer-type token mechanism, consider Vault. It has excellent support for at least one of the tools you mention (RabbitMQ.)

For flexible token auth, JWTs.

READ MORE
6 upvotes·9.3K views
Needs advice
on
KafkaKafkaRabbitMQRabbitMQ
and
RedisRedis

We are currently moving to a microservice architecture and are debating about the different options there are to handle communication between services. We are currently considering Kafka, Redis or RabbitMQ as a message broker. As RabbitMQ is a little bit older, we thought that it may be outdated. Is that true? Can RabbitMQ hold up to more modern tools like Redis and Kafka?

READ MORE
4 upvotes·187.9K views
Replies (4)
Senior Software Developer at Okta·
Recommends
on
Kafka
RabbitMQ
in

We have faced the same question some time ago. Before I begin, DO NOT use Redis as a message broker. It is fast and easy to set up in the beginning but it does not scale. It is not made to be reliable in scale and that is mentioned in the official docs. This analysis of our problems with Redis may help you.

We have used Kafka and RabbitMQ both in scale. We concluded that RabbitMQ is a really good general purpose message broker (for our case) and Kafka is really fast but limited in features. That’s the trade off that we understood from using it. In-fact I blogged about the trade offs between Kafka and RabbitMQ to document it. I hope it helps you in choosing the best pub-sub layer for your use case.

READ MORE
Tag: message-queue (tarunbatra.com)
10 upvotes·147.3K views

It depends on your requirements like number of messages to be processed per second, real time messages vs delayed, number of servers available for your cluster, whether you need streaming, etc.. Kafka works for most use cases. Not related to answer but would like to add no matter whatever broker you chose, for connecting to the broker always go for the library provided by the broker rather than Spring kafka or Spring AMQP. If you use Spring, then you will be stuck with specific Spring versions. In case you find bugs in spring then difficult because you will have to upgrade entire application to use a later Spring core version. In general, use as minimum libraries as possible to get rid of nuisance of upgrading them when they are outdated or bugs are found with them.

READ MORE
5 upvotes·3 comments·148.1K views
kaffarell
kaffarell
·
December 1st 2021 at 12:16PM

Thanks for the insight! A fast message broker would be important, persistency isn't. We also plan to deploy the message broker as a docker container to our cluster. I read somewhere online that kafka is not meant to be deployed as a container... Is that true? (What also confused me is that there isn't a official docker image for kafka).

·
Reply
Makarand Joshi
Makarand Joshi
·
December 2nd 2021 at 11:03AM

Radis is bit different compared to Rabbit MQand Kafka so use Redis only if its for non critical message flow. Between Rabbit MQ and Kafka , our experience as been for large message processing application Rabbit becomes really unstable and even have encountered corrupt data so we switched to Kafka which is more reliable

·
Reply
Bipul Agarwal
Bipul Agarwal
·
December 16th 2021 at 8:37PM

Hi Makarand, how easy was your journey from RabbitMQ to Kafka? Is it okay to ask if you have had any specific challenges as RabbitMQ sends to consumers while in Kafka Consumer needs to read. + Message structure is a bit different too?

Also, It would be nice to know if you migrated to Managed Kafka service or self hosted? (I am trying to understand how tough would it be to manage our own Kafka as we are almost finalising going with Kafka) :)

Thanks

·
Reply
View all (4)
Software Engineer ·
Needs advice
on
Amazon SQSAmazon SQSKubernetesKubernetes
and
RabbitMQRabbitMQ

Hi! I am creating a scraping system in Django, which involves long running tasks between 1 minute & 1 Day. As I am new to Message Brokers and Task Queues, I need advice on which architecture to use for my system. ( Amazon SQS, RabbitMQ, or Celery). The system should be autoscalable using Kubernetes(K8) based on the number of pending tasks in the queue.

READ MORE
7 upvotes·445.1K views
Replies (1)
Founder at Odix·
Recommends
on
Kafka

Hello, i highly recommend Apache Kafka, to me it's the best. You can deploy it in cluster mode inside K8S, thus you can have a Highly available system (also auto scalable).

Good luck

READ MORE
1 upvote·292.2K views
Needs advice
on
CeleryCelery
and
RabbitMQRabbitMQ

I am just a beginner at these two technologies.

Problem statement: I am getting lakh of users from the sequel server for whom I need to create caches in MongoDB by making different REST API requests.

Here these users can be treated as messages. Each REST API request is a task.

I am confused about whether I should go for RabbitMQ alone or Celery.

If I have to go with RabbitMQ, I prefer to use python with Pika module. But the challenge with Pika is, it is not thread-safe. So I am not finding a way to execute a lakh of API requests in parallel using multiple threads using Pika.

If I have to go with Celery, I don't know how I can achieve better scalability in executing these API requests in parallel.

READ MORE
3 upvotes·318.5K views
Replies (1)
Recommends
on
rq
Redis

For large amounts of small tasks and caches I have had good luck with Redis and RQ. I have not personally used celery but I am fairly sure it would scale well, and I have not used RabbitMQ for anything besides communication between services. If you prefer python my suggestions should feel comfortable.

Sorry I do not have a more information

READ MORE
5 upvotes·261.1K views
Software engineer at Digital Science·
Needs advice
on
Amazon SQSAmazon SQSRabbitMQRabbitMQ
and
ZeroMQZeroMQ

Hi, we are in a ZMQ set up in a push/pull pattern, and we currently start to have more traffic and cases that the service is unavailable or stuck. We want to: * Not loose messages in services outages * Safely restart service without losing messages (ZeroMQ seems to need to close the socket in the receiver before restart manually)

Do you have experience with this setup with ZeroMQ? Would you suggest RabbitMQ or Amazon SQS (we are in AWS setup) instead? Something else?

Thank you for your time

READ MORE
6 upvotes·479.6K views
Replies (2)
Recommends
on
RabbitMQ

ZeroMQ is fast but you need to build build reliability yourself. There are a number of patterns described in the zeromq guide. I have used RabbitMQ before which gives lot of functionality out of the box, you can probably use the worker queues example from the tutorial, it can also persists messages in the queue.

I haven't used Amazon SQS before. Another tool you could use is Kafka.

READ MORE
6 upvotes·1 comment·345.5K views
Scott MESSNER
Scott MESSNER
·
March 24th 2021 at 8:57AM

Amazon seems to offer a number of messaging solutions. The simplest is Amazon SQS, yes. Another is Amazon MQ if you wish to have a hosted RabbitMQ or ActiveMQ messaging platform that is compatible with JMS/AMQP. You will want to measure your needs against the constraints of your messaging scenarios. If you have a small team and you're already on AWS, a quick working solution would be to use the ready-to-go solutions from AWS. My guess is that it would cost more to hire (an) engineer(s) to build/maintain your messaging queue than to use the service-at-scale solutions of AWS. If you have a non-global messaging system you could also consider deploying your own small cluster using RabbitMQ as suggested by Shishir. Another excellent solution might be NATS.io which has a strong community, impressive performance, and is backed by CNCF.

I admit there are a lot of options -- if you wish to own and grow your messaging needs in house, then hire a team and start building. ZMQ is flexible but you will need to write the persistency module and adapt the clustering to your needs. Kafka is a resilient and distributed solution, but it requires an operations team to maintain and handle load-balancing. RabbitMQ seems to be the defacto for getting up and running but can eventually encounter clustering and scaling issues. And on the other hand, the giants offer ready-to-go messaging solutions that end up costing you little, but risk to vendor lock you if you're not careful.

I suppose I ultimately vote for taking the AWS solution -- but check the SLA and performance criteria of your service.

·
Reply
Principal Software Engineer at Accurate Background·
Recommends
on
RabbitMQ

Both would do the trick, but there are some nuances. We work with both.

From the sound of it, your main focus is "not losing messages". In that case, I would go with RabbitMQ with a high availability policy (ha-mode=all) and a main/retry/error queue pattern.

Push messages to an exchange, which sends them to the main queue. If an error occurs, push the errored out message to the retry exchange, which forwards it to the retry queue. Give the retry queue a x-message-ttl and set the main exchange as a dead-letter-exchange. If your message has been retried several times, push it to the error exchange, where the message can remain until someone has time to look at it.

This is a very useful and resilient pattern that allows you to never lose messages. With the high availability policy, you make sure that if one of your rabbitmq nodes dies, another can take over and messages are already mirrored to it.

This is not really possible with SQS, because SQS is a lot more focused on throughput and scaling. Combined with SNS it can do interesting things like deduplication of messages and such. That said, one thing core to its design is that messages have a maximum retention time. The idea is that a message that has stayed in an SQS queue for a while serves no more purpose after a while, so it gets removed - so as to not block up any listener resources for a long time. You can also set up a DLQ here, but these similarly do not hold onto messages forever. Since you seem to depend on messages surviving at all cost, I would suggest that the scaling/throughput benefit of SQS does not outweigh the difference in approach to messages there.

READ MORE
5 upvotes·218.5K views
CTO and Software Architect at Medstrat·
Needs advice
on
AppOpticsAppOptics
and
DatadogDatadog
in

We use AppOptics. I am curious what are the current leaders for APM for small companies (50 employees) that use Python, MariaDB, RabbitMQ, and Google Cloud Storage. We run both Celery and Gunicorn services. We are considering Datadog or some other deep code profiling tool that can spot I/O, DB, or other response time/request rate issues

READ MORE
3 upvotes·121K views
Replies (1)
Recommends
on
Instana

If you want to get deep insights and fast issue resolution have a look at INSTANA.

There is a public sandbox to get first insights and feeling for the tool. If you like it you can also run a free trial if you like.

READ MORE
Instana - Getting Started with APM (instana.com)
2 upvotes·2 comments·4.4K views
Gal Cohen
Gal Cohen
·
February 2nd 2021 at 7:47AM

We are running Python & Celery, our stack is based on AWS ECS. We are using NewRelic. This tool is just amazing, both for API and Offline workers. It would provide any metric I was looking for, including a profiler, SLA / SLO dashboards, infrastructure metrics. It has alerting capability that is easily integrated with Pingdom / PagerDuty / Webhooks.

·
Reply
Greg Smethells
Greg Smethells
·
September 19th 2020 at 8:29PM

Thanks, I’ll take a look.

·
Reply
CEO at Scrayos UG (haftungsbeschränkt)·

We make extensive use of Redis for our caches and use it as a way to save "semi-permanent" stuff like user-submit settings (that get refreshed on each login) or cooldowns that expire very fast. Additionally we also utilize the Pub-Sub capabilities that Redis has to offer.

We decided against using a dedicated Message-Broker/Streaming Platform like RabbitMQ or Kafka, as we already had a packet-based, custom protocol for communication between servers and services, and we only needed some "tiny" Pub-Sub magic to fill in the gaps. An entire additional service just for this oddjob would've been a total overkill.

READ MORE
1 upvote·196.3K views