《RabbitMQ in action》
Producers create messages and publish (send) them to a broker server (RabbitMQ).What’s a message? A message has two parts: a payload and a label. The payload is the data you want to transmit. It can be anything from a JSON array to an MPEG-4 of yourfavorite iguana Ziggy. RabbitMQ doesn’t care. The label is more interesting. It describes the payload, and is how RabbitMQ will determine who should get a copy of your message. Unlike, for example, TCP, where you specify a specific sender and a specificreceiver, AMQP only describes the message with a label (an exchange name andoptionally a topic tag) and leaves it to Rabbit to send it to interested receivers based on that label. The communication is fire-and-forget and one-directional. We’ll getmore details about how RabbitMQ interprets the label later when we talk about exchanges and bindings. For now, all you need to know is that producers create messagesand label them for routing (see figure 2.1).
Consumers are just as simple. They attach to a broker server and subscribe to a
queue. Think of a queue as a named mailbox. Whenever a message arrives in a particular
mailbox, RabbitMQ sends it to one of the subscribed/listening consumers. By the
time a consumer receives a message, it now only has one part: a payload. The labels
attached to the message don’t get passed along with the payload when the message is
routed. RabbitMQ doesn’t even tell you who the producer/sender was.
, if you need
to know specifically who produced an AMQP message, it’s up to the producer to
include that information as a part of the message payload.
First, you need to understand queues. Conceptually, there are
three parts to any successful routing of an AMQP message: exchanges, queues, and
bindings. The exchanges are where producers publish their messages, queues are
where the messages end up and are received by consumers, and bindings are how the
messages get routed from the exchange to particular queues.

《RabbitMQ in action》的更多相关文章
- 【推荐】《Netty in action》书籍
最近准备开始阅读一下<Netty in action>并且准备构架设计一个分布式系统.用于新项目. 貌似压力很大啊.压力就是东西.希望自己能够调节好. Netty in action是Ne ...
- 《Go in action》读后记录:Go的并发与并行
本文的主要内容是: 了解goroutine,使用它来运行程序 了解Go是如何检测并修正竞争状态的(解决资源互斥访问的方式) 了解并使用通道chan来同步goroutine 一.使用goroutine来 ...
- 《ActiveMQ in Action》【PDF】下载
内容介绍TheApache ActiveMQ message broker is an open source implementation ofthe Java Message Service sp ...
- 《maven in action》部分知识点总结
maven in action 的部分知识点总结 今天又将<maven in action>这本书看了一遍,总结了一下,大概需要的知识点 (一)解耦 使用maven,在没有任何实际的J ...
- 《Netty in action》 读书笔记
声明:这篇文章是记录读书过程中的知识点,并加以归纳总结,成文.文中图片.代码出自<Netty in action>. 1. 为什么用Netty? 每个框架的流行,都一定有它出众的地方.Ne ...
- Netty | 第1章 Java NIO 网络编程《Netty In Action》
目录 前言 1. Java 网络编程 1.1 Javs NIO 基本介绍 1.2 缓冲区 Buffer 1.2 通道 Channel 1.3 选择器 Selector 1.4 NIO 非阻塞网络编程原 ...
- 《Netty in action》目录修复版本分享
最近阅读了Netty in action一书.深感外国友人的书籍编写能力强大.作者由简入深.精简描述了Netty的相关知识,如何使用等等. 本来想翻译一下的.尝试着翻译了一点之后.发现非常痛苦啊.ps ...
- 《Spring In Action》阅读笔记之装配bean
Spring主要装配机制 1.在XML中进行显式配置 2.在Java中进行显式配置 3.隐式的的bean发现机制和自动装配 自动化装配bean Spring从两个角度来实现自动化装配 1.组件扫描:S ...
- 重读《Struts In Action》
Figure 1.1. The Java Servlet API exposes the HTTP client/server protocol to the Java platform. S ...
随机推荐
- Poj OpenJudge 百练 2632 Crashing Robots
1.Link: http://poj.org/problem?id=2632 http://bailian.openjudge.cn/practice/2632/ 2.Content: Crashin ...
- d3 之值域映射
<html> <head> <meta charset="utf-8"> <title>d3研究室</title> &l ...
- 一些值得思考的"小题"一
如下是我们查找数组中某个元素的一种通常做法 const int *Find(const int *array, int length, int x) { const int *p = array; ; ...
- 仿春雨医生 安卓app(android)
仿春雨医生 安卓app(android) 目前APP处与开发完善中,可过程序自下载更新,如有BUG报错,请联系QQ 131 065 1206 支持安卓(android) .IOS(IPHONE),PA ...
- StreamReader和StreamWrite与FileStream区别
具体用法不在赘述. 记录一下用法的区别 StreamReader: FileStream fs = new FileStream(@"D:\Readme.txt",FileMode ...
- mac 上的版本控制工具SmartSVN9.0.4(破解版)
附带上破解版安装说明: 1.在MAC上选中SmartSVN.dmg,右键->打开2.双击syntevo_keygen.jar 如果没有安装java会自动提示安装的3.输入Name Email(随 ...
- 对.Net WebSocket 和Socket的原理的思考
今早上班路上接到了一个朋友的微信信息,问我对WebSocket 是否熟悉,一楞,印象之中没有用过这个类....来到公司后,得空问了一下度娘,原来这是一个随着HTML5推出的一种新协议,意义在于能实现浏 ...
- Scrapy简介
什么是Scrapy? Scrapy是一个快速.高级的爬行器和网页抓取框架,用来抓取网站和提取网页中结构化的数据.它被广泛的使用于监控数据采集和自动化测试. 参考:http://scrapy.org/
- liunx命令之whereis、which、find的区别和联系
liunx命令之whereis.which.find的区别和联系
- Entity Framework 安装出现问题
Entity Framework 详情请看: http://ulfqbpl.blog.163.com/blog/static/8778355220126272473276/