Rascal is a rich pub/sub wrapper around amqplib. One of the best things about amqplib is that it makes no assumptions about how you use it. Another is that it doesn’t attempt to abstract AMQP Concepts. Therefore, the library provides a lot of control and flexibility, but it is your responsibility to adopt appropriate patterns […]
Tag: rabbitmq
rabbitmq switch related example code
1. Sector switch Define sector switches and queues package com.macro.mall.portal.config; import org.springframework.amqp.core.Binding; import org.springframework.amqp.core.BindingBuilder; import org.springframework.amqp.core.FanoutExchange; import org.springframework.amqp.core.Queue; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * Sector switch test */ @Configuration public class RabbitMqFanoutQueueConfig { //==================== In fanout mode, the messages sent belong to broadcast mode================== == /** * Define queue fanout.a fanout.b fanout.c */ @Bean public […]
An in-depth introduction to RabbitMQ: sequential consumption, dead letter queue and delay queue
1. RabbitMQ 1.1 Core Components RabbitMQ is an open source message middleware that implements the Advanced Message Queuing Protocol (AMQP) and provides various important components to support the production, transmission and consumption of messages. Producer: The producer is the sender of messages and is responsible for publishing messages to the RabbitMQ server. Messages can contain […]
SpringCloud integrates WebSocket and rabbitMQ
Article Directory summary Overall architecture process Explanation of technical terms technical details summary Summary Requirement goal: In the springcloud project, realize real-time refresh of high-frequency simple data to the API externally. Goal achieved: 1. Lightweight data can be refreshed in real time using WebSocket. The configuration is simple and easy to use. If the data […]
Implementing eventually consistent distributed transactions for placing orders and reducing inventory based on RabbitMQ
The National Day holiday really gave me a break, and the update progress was slow. Now that the status has finally been adjusted back, continue to update. Without further ado, let me show you the overall data flow diagram. Text Interpretation Step 1: The user places an order and calls the order service. We directly […]
How does RabbitMQ implement a delay queue?
Delay queue means that after a message is sent, it is not executed immediately, but waits for a specific time before the consumer executes the message. The usage scenarios of delay queue include the following: Orders not paid on time will be canceled after 30 minutes expires. Push messages to users with low activity after […]