Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is RabbitMQ?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces you what is RabbitMQ, the content is very detailed, interested friends can use for reference, hope to be helpful to you.

Overview

RabbitMQ is an open source messaging component based on AMQP, which is mainly used to store and forward messages in distributed systems. It is written by Erlang language which is famous for its high performance, high availability and high scalability.

Characteristics

High reliability: RabbitMQ provides a variety of features that allow you to make tradeoffs between reliability and performance, including persistence, sending replies, release acknowledgements, and high availability.

Highly available queue: supports cross-machine clusters and queue secure mirror backup. No matter which side of the message producer or consumer has problems, it will not affect the normal sending and receiving of messages.

Flexible routing: all messages are forwarded to various message queues through the router. RabbitMQ has several commonly used routers, and complex routing functions can be accomplished through the combination of routers and custom router plug-ins.

working principle

The message flow process from the sender to the receiver, that is, the message working mechanism of RabbitMQ, is shown in the following figure:

Basic usage

There are six basic uses: one-to-one, one-to-many, publish and subscribe mode, send and receive according to routing rules, topic, RPC (that is, remote storage calls). We will introduce the use of one-to-one, one-to-many, and themes.

1. Single to single: single send, single receive

2. One-to-many: one sender and multiple receivers, such as distributed task dispatch

3. Topic: Exchange Type is topic, and you need to specify the switch and Routing Key when sending messages. The consumer's message queue is bound to the switch and matched to Routing Key to realize the message subscription. After subscription, the message can be received. The message can be received only if the consumer binds the queue to the switch and the specified Routing Key meets the matching rules.

Where Routing Key can be set to wildcards, such as * or # (* means to match a word in Routing Key, and # means that any Routing Key message can be received). If Routing Key consists of multiple words, use between words. To separate.

Naming convention:

Suggestions for naming switch names: Ex {AppID}. {Custom ExchangeName}, and for queue names: MQ {AppID}. {Custom QueueName}.

A handy wheel

EasyNetQ is the leading client of RabbitMQ on .NET, API, with more than 4 million downloads on NuGet.org. This is an open source project.

The purpose of EasyNetQ is to provide a .NET class library that is as concise as possible for RabbitMQ. To achieve these goals, EasyNetQ provides a view where you think you will use RabbitMQ in .NET. To keep it flexible, for simplicity's sake, EasyNetQ enforces some simple conventions. These include the following:

Messages are represented by. Net types.

Messages are routed through the .NET type.

On what is RabbitMQ to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report