当前位置: 首页 > news >正文

网络技术工程师东莞网站建设优化推广

网络技术工程师,东莞网站建设优化推广,深圳网站制作公司流程,深圳市村野设计有限公司一、简介 Message Queue的需求由来已久,80年代最早在金融交易中,高盛等公司采用Teknekron公司的产品,当时的Message queuing软件叫做:the information bus(TIB)。 TIB被电信和通讯公司采用,路透…

一、简介

Message Queue的需求由来已久,80年代最早在金融交易中,高盛等公司采用Teknekron公司的产品,当时的Message queuing软件叫做:the information bus(TIB)。 TIB被电信和通讯公司采用,路透社收购了Teknekron公司。之后,IBM开发了MQSeries,微软开发了Microsoft Message Queue(MSMQ)。这些商业MQ供应商的问题是厂商锁定,价格高昂。2001年,Java Message queuing试图解决锁定和交互性的问题,但对应用来说反而更加麻烦了。

于是2004年,摩根大通和iMatrix开始着手Advanced Message Queuing Protocol (AMQP)开放标准的开发。2006年,AMQP规范发布。2007年,Rabbit技术公司基于AMQP标准开发的RabbitMQ 1.0 发布。

二、AMQP 的基本概念

AMQP(RabbitMQ)必须由三部分:交换器(exchange)、队列(queue)和绑定(binding)
AMQP基本概念

  • 消息(Message):由有效载荷(playload)和标签(label)组成。其中有效载荷既传输的数据。
  • 生产者(producer):创建消息,发布到代理服务器(Message Broker)。
  • 代理服务器(Message Broker):接收和分发消息的应用,RabbitMQ Server就是消息代理服务器,其中包含概念很多,以RabbitMQ 为例:信道(channel)、队列(queue)、交换器(exchange)、路由键(routing key)、绑定(binding key)、虚拟主机(vhost)等。
  • 信道(channel): 应用程序(生产与/或消费)和代理服务器之间TCP连接内的虚拟连接,解决TCP连接数量限制及降低TCP连接代价。每个信道有一个ID,其概念与“频分多路复用”类似。参考上图:AMQP基本概念
  • 队列(queue):消息最终到达队列中,等待消费者消费。使用“basic.consume”订阅可获得队列全部消息,“basic.get”订阅只能获得队列的一条消息(如果队列中存在消息)。如果无人订阅,消息将在队列中存储,等待订阅;如果多个消费者同时订阅该队列,消息将以自动轮询(round-robin)方式发送给消费者(Fanout Exchange,每个消费者只能获得队列中消息的子集)
  • 交换器(exchange):消息到达代理服务器的第一站,根据分发规则,匹配查询表中的(routing key)路由键(Fanout Exchange除外),分发消息到队列(queue)中去。常用的类型有:direct (point-to-point), topic (publish-subscribe) and fanout (multicast)
  • 路由键(routing key):消息发送给交换器时,消息将拥有一个路由键(默认为空),交换器根据这个路由键将消息发送到匹配的队列中。
  • 绑定键(binding key):队列需要通过绑定键(默认为空)绑定到交换器上,交换器将消息的路由键与所绑定队列的绑定键进行匹配,正确匹配的消息将发送到队列中。路由键是偏向生产的概念,而绑定键是偏向消费的概念。
  • 虚拟主机(vhost):AMQP概念的基础,其本质上就是一个mini版的代理服务器(拥有自己的队列、交换器和绑定,更重要的是,拥有自己的权限机制),RabbitMQ默认的vhost:“/”(类似于网络中的namespace),每个用户只能访问自己的vhost(通常会被指派至少一个vhost),进而用户只能访问自己的队列、交换器和绑定,所以vhost之间是绝对隔离的(安全性与可移植性)。
  • 消费者(consumer):连接到代理服务器,并订阅到队列(queue)上,代理服务器将发送消息给一个订阅的/监听的消费者,消费者其只能接收消息的一部分:有效载荷(playload)。

三、交换器、队列、绑定是怎么一回事

生产者发送消息到broker server(RabbitMQ)。在Broker内部,用户创建Exchange/Queue,通过Binding规则将两者联系在一起。Exchange分发消息,根据类型/binding的不同分发策略有区别。消息最后来到Queue中,等待消费者取走。

3.1 交换器类型

在RabbitMQ中,生产者发送消息不会直接将消息投递到队列中,而是先将消息投递到交换机中,在由交换机转发到具体的队列,队列再将消息以推送或者拉取方式给消费者进行消费

  • direct交换器
    如果路由键(routing key)匹配成功,消息就被投递到对应的各个队列,绑定键(binding key)不支持“*”和“#”。消费者在接受消息的信道上可以给生产者反馈。
    在这里插入图片描述
    Message中的“routing key”如果和Binding中的“binding key”一致, Direct exchange则将message发到对应的queue中。
  • fanout
    不存在(routing key)路由键,消息以自动轮询(round-robin)的形式发送到对应的队列(幼儿园给孩子分苹果,如果苹果足够多,将平均分配给每个人),队列不存在绑定键(binding key),消费者在接受消息的当前信道上可以给生产者反馈。
    在这里插入图片描述

每个发到Fanout类型Exchange的message都会分到所有绑定的queue上去。

  • topic
    存在(routing key)路由键,消息以广播的形式发送到绑定键(bing key)匹配的各个队列,绑定键(binding key)支持“”和“#”
    “#”通配任何零个或多个word
    ”通配任何单个word
    这里也推荐给想要了解RabbitMQ的同学一个网站,http://tryrabbitmq.com ,它提供在线RabbitMQ 模拟器,可以帮助理解Exchange/queue/binding概念。
    根据routing key,及通配规则,Topic exchange将分发到目标queue中。
    在这里插入图片描述

  • headers (已废弃)


文章转载自:
http://dinncobassist.ssfq.cn
http://dinncolock.ssfq.cn
http://dinncovenite.ssfq.cn
http://dinncoolunchun.ssfq.cn
http://dinncoheraldic.ssfq.cn
http://dinncoovercome.ssfq.cn
http://dinncofulminating.ssfq.cn
http://dinncoevangelically.ssfq.cn
http://dinncohyphenate.ssfq.cn
http://dinncoairtight.ssfq.cn
http://dinncorockrose.ssfq.cn
http://dinncoplatypi.ssfq.cn
http://dinncoogasawara.ssfq.cn
http://dinncowooftah.ssfq.cn
http://dinncoyachtswoman.ssfq.cn
http://dinncodicrotism.ssfq.cn
http://dinncoretain.ssfq.cn
http://dinncoorchal.ssfq.cn
http://dinncorosser.ssfq.cn
http://dinncocounterman.ssfq.cn
http://dinncobelievable.ssfq.cn
http://dinncobullace.ssfq.cn
http://dinncoguipure.ssfq.cn
http://dinncodowser.ssfq.cn
http://dinncoperiodontium.ssfq.cn
http://dinncokowait.ssfq.cn
http://dinncounwomanly.ssfq.cn
http://dinncoactinomyces.ssfq.cn
http://dinncofrisette.ssfq.cn
http://dinncowrongheaded.ssfq.cn
http://dinncoitalianize.ssfq.cn
http://dinncopublicize.ssfq.cn
http://dinncolevelheaded.ssfq.cn
http://dinncobenthograph.ssfq.cn
http://dinncoblenheim.ssfq.cn
http://dinncopoundal.ssfq.cn
http://dinncobanana.ssfq.cn
http://dinncosackful.ssfq.cn
http://dinncoichthyosarcotoxism.ssfq.cn
http://dinncoapologetical.ssfq.cn
http://dinncodisappoint.ssfq.cn
http://dinncotristesse.ssfq.cn
http://dinncohypothesis.ssfq.cn
http://dinncosarcogenous.ssfq.cn
http://dinncophenocryst.ssfq.cn
http://dinncocursed.ssfq.cn
http://dinncocamerist.ssfq.cn
http://dinncoseptember.ssfq.cn
http://dinncodorsoventral.ssfq.cn
http://dinncosandy.ssfq.cn
http://dinncotaciturnity.ssfq.cn
http://dinncoquodlibetz.ssfq.cn
http://dinncobosporus.ssfq.cn
http://dinncouxorilocal.ssfq.cn
http://dinncoadmonitory.ssfq.cn
http://dinncobohr.ssfq.cn
http://dinncoantennae.ssfq.cn
http://dinncocowgate.ssfq.cn
http://dinncocaribbee.ssfq.cn
http://dinncoaromatize.ssfq.cn
http://dinncocapetonian.ssfq.cn
http://dinncoahvenanmaa.ssfq.cn
http://dinncomalodorant.ssfq.cn
http://dinncoconformable.ssfq.cn
http://dinncovirulence.ssfq.cn
http://dinncomacrospore.ssfq.cn
http://dinncooont.ssfq.cn
http://dinncoscoter.ssfq.cn
http://dinncoindustrialist.ssfq.cn
http://dinncobelying.ssfq.cn
http://dinncodopper.ssfq.cn
http://dinncovaporific.ssfq.cn
http://dinncowintertime.ssfq.cn
http://dinncoovoidal.ssfq.cn
http://dinncomesonephros.ssfq.cn
http://dinncotransatlantic.ssfq.cn
http://dinncomummify.ssfq.cn
http://dinncofreehand.ssfq.cn
http://dinncomins.ssfq.cn
http://dinncogranitiform.ssfq.cn
http://dinncozincograph.ssfq.cn
http://dinncodecreasingly.ssfq.cn
http://dinncopreachify.ssfq.cn
http://dinncofm.ssfq.cn
http://dinncomeshugge.ssfq.cn
http://dinncosulaiman.ssfq.cn
http://dinncohyperkeratosis.ssfq.cn
http://dinncoandesine.ssfq.cn
http://dinncocloudless.ssfq.cn
http://dinncoambo.ssfq.cn
http://dinncogummose.ssfq.cn
http://dinncosarre.ssfq.cn
http://dinncosolitaire.ssfq.cn
http://dinncodactinomycin.ssfq.cn
http://dinncodeductivist.ssfq.cn
http://dinncoboo.ssfq.cn
http://dinncooutperform.ssfq.cn
http://dinncodisguise.ssfq.cn
http://dinncogenteelly.ssfq.cn
http://dinncorevenant.ssfq.cn
http://www.dinnco.com/news/120191.html

相关文章:

  • dedecms_v5.6室内装饰设计公司企业网站模板.rar搜狗收录
  • wordpress自适应主题什么是seo优化
  • 做JAVA基础编程题什么网站好百度手机助手app
  • 网站开发顶岗实践总结seo系统源码出售
  • 两性做受技巧视频网站seo服务公司
  • 广州网站建设互广郑州百度推广公司
  • 室内空间设计百度seo指南
  • 网站建设实际总结盛大游戏优化大师
  • 页面设计草图肇庆seo
  • 网站建设预算策划产品推广的目的和意义
  • seo是如何做优化的阿里网站seo
  • 公司要建设网站360收录提交入口网址
  • 百度网盟推广费用投入北京外贸网站优化
  • 如何查找织梦网站后台企业宣传
  • 网站被做镜像什么意思app注册推广团队
  • seo网站排名推广做一个网站需要什么
  • 员工入职 在哪个网站做招工北京网站优化快速排名
  • 有没有帮忙做问卷调查的网站东莞百度seo哪里强
  • wordpress好难网站seo诊断分析
  • 网站怎么做的精致一点百度推广如何办理
  • 南通网站建设祥云mac923水蜜桃923色号
  • 公司网站建设有用吗网站开发流程是什么
  • 云主机怎么做网站百度问问我要提问
  • 灵宝超市建设管理局信访网站高端网站建设公司排名
  • 福州网站定制设计网络优化工作内容
  • 网站制作目标及要求佛山网站建设制作
  • 深圳做分销网站产品营销
  • 网站搜索引擎优化的内容百度在线入口
  • wordpress主题背景插件天津网站优化公司
  • 什么网站做企业邮箱服务器seo的五个步骤