Zum Inhalt springen
_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
Referenzen Technologien Blog Know-how Tools
Über uns Zusammenarbeit Karriere
CS EN DE
Lassen Sie uns sprechen

RabbitMQ — asynchronní messaging v praxi

25. 09. 2014 1 Min. Lesezeit CORE SYSTEMSdevelopment
RabbitMQ — asynchronní messaging v praxi

Uživatel klikne na „Generovat report”. Synchronní zpracování trvá 30 sekund. Řešení? Přesuňte těžkou práci do pozadí. RabbitMQ je náš nástroj pro asynchronní zpracování a decoupling služeb.

Proč RabbitMQ

AMQP standard, bohatý management UI, výborná Java podpora přes Spring AMQP. Producent pošle zprávu, konzument ji zpracuje. Lepší UX, škálovatelnost, odolnost.

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 a dead letter queue

Tři pokusy s exponenciálním backoff, pak přesun do DLQ. Monitoring DLQ součástí alertingu. Management Plugin na portu 15672 pro přehled front a throughput.

Messaging je architekturní vzor

Místo synchronních volání přemýšlíte v událostech a frontách. Výsledek: odolnější, škálovatelnější systém.

rabbitmqmessagingamqpasynchronní
Teilen:

CORE SYSTEMS

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

Brauchen Sie Hilfe bei der Implementierung?

Unsere Experten helfen Ihnen bei Design, Implementierung und Betrieb. Von der Architektur bis zur Produktion.

Kontaktieren Sie uns