_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

RabbitMQ — asynchronous messaging in practice

25. 09. 2014 1 min read CORE SYSTEMSdevelopment
RabbitMQ — asynchronous messaging in practice

The user clicks “Generate report”. Synchronous processing takes 30 seconds. The solution? Move the heavy work to the background. RabbitMQ is our tool for asynchronous processing and service decoupling.

Why RabbitMQ

AMQP standard, a rich management UI, excellent Java support via Spring AMQP. The producer sends a message, the consumer processes it. Better UX, scalability, and resilience.

Exchanges, queues, bindings

@Bean
public Queue reportQueue() {
    return new Queue("reports.generate", true);
}

@RabbitListener(queues = "reports.generate")
public void handleReport(ReportRequest request) {
    byte[] pdf = reportService.generate(request);
    emailService.sendReport(request.getUserEmail(), pdf);
}

Error handling and the dead letter queue

Three attempts with exponential backoff, then a move to the DLQ. DLQ monitoring is part of alerting. The Management Plugin on port 15672 provides an overview of queues and throughput.

Messaging is an architectural pattern

Instead of synchronous calls you think in events and queues. The result: a more resilient, more scalable system.

rabbitmqmessagingamqpasynchronní
Share:

CORE SYSTEMS

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us