nodejs operates rabbitMQ amqplib library message persistence

config.js const { MQ_HOST, HOST, MQ_PORT } = process.env; const mqHost = MQ_HOST || HOST || “127.0.0.1”; const mqPort = MQ_PORT || 5672; const mqUsername = “root”; const mqPassword = “password”; const mqProtocol = “amqp”; const exchangeName = ‘exchange_direct_saas’; //switch const queueName = ‘queue_direct_saas’; const routingKey = ‘saasIsolution’;//routing key const config = { mqHost, mqPort, […]

[Java] Microservice – RabbitMQ message queue (SpringAMQP implements five message models)

Directory 1. First introduction to MQ 1.1. Synchronous and asynchronous communication 1.1.1. Synchronous communication 1.1.2.Asynchronous communication 1.2.Technical comparison: 2. Quick Start 2.1.RabbitMQ message model 2.4.1.publisher implementation 2.4.2.consumer implementation 2.5. Summary 3.SpringAMQP 3.1.Basic Queue simple queue model 3.1.1.Message sending 3.1.2. Message reception 3.1.3.Testing 3.2.WorkQueue 3.2.1.Message sending 3.2.2. Message reception 3.2.3.Testing 3.2.4. Those who can do more […]

Microservices 08-Understanding and using SpringAMQP

1. Understanding of AMQP 1.1 Introduction What is AMQP? You will know after reading it_hello_Reading is a blog that makes money-CSDN blog_amqp Benefits: What connection: message queue connection, channel: channel for service to send and receive messages, Queue: message queue -> you don’t need to write these yourself work process: The Publisher publishes the Message […]

Use SpringAMQP to implement RabbitMQ’s ordinary queues and work queues

1. Ordinary queue Ordinary queues are the most common queue type, and messages are delivered in the queue in first-in, first-out (FIFO) order. When producers send messages to ordinary queues, consumers can receive and process these messages in order. (1) Dependency introduction <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </dependency> (2) Configuration yml file spring: rabbitmq: host: 127.0.0.1 port: […]

org.springframework.amqp.AmqpIOException: java.io.IOException

Guli mall rabbitMQ module test class creates switch and reports error Error details: org.springframework.amqp.AmqpIOException: java.io.IOException at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:71) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.SimpleConnection.createChannel(SimpleConnection.java:68) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$ChannelCachingConnectionProxy.createBareChannel(CachingConnectionFactory.java:1375) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$ChannelCachingConnectionProxy.access$200(CachingConnectionFactory.java:1361) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.doCreateBareChannel(CachingConnectionFactory.java:674) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createBareChannel(CachingConnectionFactory.java:657) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.getCachedChannelProxy(CachingConnectionFactory.java:627) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.getChannel(CachingConnectionFactory.java:518) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.access$1700(CachingConnectionFactory.java:102) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.connection.CachingConnectionFactory$ChannelCachingConnectionProxy.createChannel(CachingConnectionFactory.java:1380) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:2082) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2050) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:2030) ~[spring-rabbit-2.1.8.RELEASE.jar:2.1.8.RELEASE] at […]

12_Apache Pulsar pluggable protocol, kafka on Pulsar (KOP), Pulsar KOP, AMQP protocol (RabbitMQ) on Pulsar (AOP), Pulsar AOP

2.4. Apache Pulsar Pluggable Protocol 2.4.1.kafka on Pulsar (KOP) 2.4.1.1. Apache Pulsar KOPs 2.4.1.2. Apache Pulsar KOP – How to Configure 2.4.1.3. Apache Pulsar KOP – How to use it 2.4.2. AMQP protocol (RabbitMQ) on Pulsar (AOP) 2.4.2.1. Apache Pulsar AOP 2.4.2.2. How to configure Apache Pulsar AOP 2.4.2.3. How to use Apache Pulsar AOP […]

RabbitMQ message queue (Spring boot AMQP)

Article directory There are several reasons why you should choose RabbitMQ: Comparison between mq RabbitMQ vs Apache Kafka RabbitMQ vs ActiveMQ RabbitMQ vs RocketMQ RabbitMQ vs. Redis linux docker deployment rabbitmq Pull to mirror Create a mount directory Run mirror Install the visual interface plug-in: enter the container Springboot AMQP RabbitMQ send message example Basic […]

RabbitMQ-Spring AMQP

Summary RabbitMQ is an open source message broker, which is a kind of message middleware. RabbitMQ supports asynchronous messaging, supports multiple messaging protocols, message queues, delivery confirmation, flexible routing to queues, and multiple exchange types. (From the official website explanation) SpringAMQP is the application of Spring’s core concepts to the development of AMQP (RabbitMQ)-based messaging […]

[Spring Cloud] Summary of Spring AMQP

Article directory 1. AMQP 2. Basic message model queue 3. WorkQueue model 4. Publish and subscribe model 5. Publish Subscribe – Fanout Exchange 6. Publish Subscribe – DirectExchange 7. Publish Subscribe – TopicExchange 8. Message Converter 1. AMQP Advanced Message Queuing Protocol, Advanced Message Queuing Protocol. is an open standard for passing business messages between […]