0


RabbitMQ的工作模式

RabbitMQ的工作模式

Hello World 模式

#mermaid-svg-sbc2QNYZFRQYbEib {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-sbc2QNYZFRQYbEib .error-icon{fill:#552222;}#mermaid-svg-sbc2QNYZFRQYbEib .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-sbc2QNYZFRQYbEib .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-sbc2QNYZFRQYbEib .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-sbc2QNYZFRQYbEib .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-sbc2QNYZFRQYbEib .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-sbc2QNYZFRQYbEib .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-sbc2QNYZFRQYbEib .marker{fill:#333333;stroke:#333333;}#mermaid-svg-sbc2QNYZFRQYbEib .marker.cross{stroke:#333333;}#mermaid-svg-sbc2QNYZFRQYbEib svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-sbc2QNYZFRQYbEib .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-sbc2QNYZFRQYbEib .cluster-label text{fill:#333;}#mermaid-svg-sbc2QNYZFRQYbEib .cluster-label span{color:#333;}#mermaid-svg-sbc2QNYZFRQYbEib .label text,#mermaid-svg-sbc2QNYZFRQYbEib span{fill:#333;color:#333;}#mermaid-svg-sbc2QNYZFRQYbEib .node rect,#mermaid-svg-sbc2QNYZFRQYbEib .node circle,#mermaid-svg-sbc2QNYZFRQYbEib .node ellipse,#mermaid-svg-sbc2QNYZFRQYbEib .node polygon,#mermaid-svg-sbc2QNYZFRQYbEib .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-sbc2QNYZFRQYbEib .node .label{text-align:center;}#mermaid-svg-sbc2QNYZFRQYbEib .node.clickable{cursor:pointer;}#mermaid-svg-sbc2QNYZFRQYbEib .arrowheadPath{fill:#333333;}#mermaid-svg-sbc2QNYZFRQYbEib .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-sbc2QNYZFRQYbEib .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-sbc2QNYZFRQYbEib .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-sbc2QNYZFRQYbEib .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-sbc2QNYZFRQYbEib .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-sbc2QNYZFRQYbEib .cluster text{fill:#333;}#mermaid-svg-sbc2QNYZFRQYbEib .cluster span{color:#333;}#mermaid-svg-sbc2QNYZFRQYbEib div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-sbc2QNYZFRQYbEib :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}

       Producer 
     

       Queue 
     

       Consumer 
     

Work Queues 模式

#mermaid-svg-PKlIVRmADscpqWEN {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-PKlIVRmADscpqWEN .error-icon{fill:#552222;}#mermaid-svg-PKlIVRmADscpqWEN .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-PKlIVRmADscpqWEN .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-PKlIVRmADscpqWEN .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-PKlIVRmADscpqWEN .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-PKlIVRmADscpqWEN .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-PKlIVRmADscpqWEN .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-PKlIVRmADscpqWEN .marker{fill:#333333;stroke:#333333;}#mermaid-svg-PKlIVRmADscpqWEN .marker.cross{stroke:#333333;}#mermaid-svg-PKlIVRmADscpqWEN svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-PKlIVRmADscpqWEN .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-PKlIVRmADscpqWEN .cluster-label text{fill:#333;}#mermaid-svg-PKlIVRmADscpqWEN .cluster-label span{color:#333;}#mermaid-svg-PKlIVRmADscpqWEN .label text,#mermaid-svg-PKlIVRmADscpqWEN span{fill:#333;color:#333;}#mermaid-svg-PKlIVRmADscpqWEN .node rect,#mermaid-svg-PKlIVRmADscpqWEN .node circle,#mermaid-svg-PKlIVRmADscpqWEN .node ellipse,#mermaid-svg-PKlIVRmADscpqWEN .node polygon,#mermaid-svg-PKlIVRmADscpqWEN .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-PKlIVRmADscpqWEN .node .label{text-align:center;}#mermaid-svg-PKlIVRmADscpqWEN .node.clickable{cursor:pointer;}#mermaid-svg-PKlIVRmADscpqWEN .arrowheadPath{fill:#333333;}#mermaid-svg-PKlIVRmADscpqWEN .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-PKlIVRmADscpqWEN .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-PKlIVRmADscpqWEN .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-PKlIVRmADscpqWEN .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-PKlIVRmADscpqWEN .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-PKlIVRmADscpqWEN .cluster text{fill:#333;}#mermaid-svg-PKlIVRmADscpqWEN .cluster span{color:#333;}#mermaid-svg-PKlIVRmADscpqWEN div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-PKlIVRmADscpqWEN :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}

       Producer 
     

       Queue 
     

       Consumer1 
     

       Consumer2 
     

Publish/Subscribe 模式

#mermaid-svg-VPliyj9vUeHWZ3WJ {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .error-icon{fill:#552222;}#mermaid-svg-VPliyj9vUeHWZ3WJ .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-VPliyj9vUeHWZ3WJ .marker{fill:#333333;stroke:#333333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .marker.cross{stroke:#333333;}#mermaid-svg-VPliyj9vUeHWZ3WJ svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-VPliyj9vUeHWZ3WJ .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .cluster-label text{fill:#333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .cluster-label span{color:#333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .label text,#mermaid-svg-VPliyj9vUeHWZ3WJ span{fill:#333;color:#333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .node rect,#mermaid-svg-VPliyj9vUeHWZ3WJ .node circle,#mermaid-svg-VPliyj9vUeHWZ3WJ .node ellipse,#mermaid-svg-VPliyj9vUeHWZ3WJ .node polygon,#mermaid-svg-VPliyj9vUeHWZ3WJ .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-VPliyj9vUeHWZ3WJ .node .label{text-align:center;}#mermaid-svg-VPliyj9vUeHWZ3WJ .node.clickable{cursor:pointer;}#mermaid-svg-VPliyj9vUeHWZ3WJ .arrowheadPath{fill:#333333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-VPliyj9vUeHWZ3WJ .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-VPliyj9vUeHWZ3WJ .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-VPliyj9vUeHWZ3WJ .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-VPliyj9vUeHWZ3WJ .cluster text{fill:#333;}#mermaid-svg-VPliyj9vUeHWZ3WJ .cluster span{color:#333;}#mermaid-svg-VPliyj9vUeHWZ3WJ div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-VPliyj9vUeHWZ3WJ :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}

       Producer 
     

       exchange 
     

       Queue1 
     

       Consumer1 
     

       Queue2 
     

       Consumer2 
     

Routing 模式

#mermaid-svg-5Ji1iHtv8oIIINkK {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-5Ji1iHtv8oIIINkK .error-icon{fill:#552222;}#mermaid-svg-5Ji1iHtv8oIIINkK .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-5Ji1iHtv8oIIINkK .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-5Ji1iHtv8oIIINkK .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-5Ji1iHtv8oIIINkK .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-5Ji1iHtv8oIIINkK .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-5Ji1iHtv8oIIINkK .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-5Ji1iHtv8oIIINkK .marker{fill:#333333;stroke:#333333;}#mermaid-svg-5Ji1iHtv8oIIINkK .marker.cross{stroke:#333333;}#mermaid-svg-5Ji1iHtv8oIIINkK svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-5Ji1iHtv8oIIINkK .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-5Ji1iHtv8oIIINkK .cluster-label text{fill:#333;}#mermaid-svg-5Ji1iHtv8oIIINkK .cluster-label span{color:#333;}#mermaid-svg-5Ji1iHtv8oIIINkK .label text,#mermaid-svg-5Ji1iHtv8oIIINkK span{fill:#333;color:#333;}#mermaid-svg-5Ji1iHtv8oIIINkK .node rect,#mermaid-svg-5Ji1iHtv8oIIINkK .node circle,#mermaid-svg-5Ji1iHtv8oIIINkK .node ellipse,#mermaid-svg-5Ji1iHtv8oIIINkK .node polygon,#mermaid-svg-5Ji1iHtv8oIIINkK .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-5Ji1iHtv8oIIINkK .node .label{text-align:center;}#mermaid-svg-5Ji1iHtv8oIIINkK .node.clickable{cursor:pointer;}#mermaid-svg-5Ji1iHtv8oIIINkK .arrowheadPath{fill:#333333;}#mermaid-svg-5Ji1iHtv8oIIINkK .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-5Ji1iHtv8oIIINkK .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-5Ji1iHtv8oIIINkK .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-5Ji1iHtv8oIIINkK .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-5Ji1iHtv8oIIINkK .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-5Ji1iHtv8oIIINkK .cluster text{fill:#333;}#mermaid-svg-5Ji1iHtv8oIIINkK .cluster span{color:#333;}#mermaid-svg-5Ji1iHtv8oIIINkK div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-5Ji1iHtv8oIIINkK :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}
a

a

b

c

       Producer 
     

       exchange 
     

       Queue1 
     

       Queue2 
     

       Consumer1 
     

       Consumer2 
     

Topics 模式

#mermaid-svg-WgHyZ2lVyyxhp7ZH {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .error-icon{fill:#552222;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .marker{fill:#333333;stroke:#333333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .marker.cross{stroke:#333333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .cluster-label text{fill:#333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .cluster-label span{color:#333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .label text,#mermaid-svg-WgHyZ2lVyyxhp7ZH span{fill:#333;color:#333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .node rect,#mermaid-svg-WgHyZ2lVyyxhp7ZH .node circle,#mermaid-svg-WgHyZ2lVyyxhp7ZH .node ellipse,#mermaid-svg-WgHyZ2lVyyxhp7ZH .node polygon,#mermaid-svg-WgHyZ2lVyyxhp7ZH .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .node .label{text-align:center;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .node.clickable{cursor:pointer;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .arrowheadPath{fill:#333333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .cluster text{fill:#333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH .cluster span{color:#333;}#mermaid-svg-WgHyZ2lVyyxhp7ZH div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-WgHyZ2lVyyxhp7ZH :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}
.a.

..b

c.#

       Producer 
     

       exchange 
     

       Queue1 
     

       Queue2 
     

       Consumer1 
     

       Consumer2 
     

RPC 模式

#mermaid-svg-owTnJz5GJdKXDc5u {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-owTnJz5GJdKXDc5u .error-icon{fill:#552222;}#mermaid-svg-owTnJz5GJdKXDc5u .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-owTnJz5GJdKXDc5u .edge-thickness-normal{stroke-width:2px;}#mermaid-svg-owTnJz5GJdKXDc5u .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-owTnJz5GJdKXDc5u .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-owTnJz5GJdKXDc5u .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-owTnJz5GJdKXDc5u .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-owTnJz5GJdKXDc5u .marker{fill:#333333;stroke:#333333;}#mermaid-svg-owTnJz5GJdKXDc5u .marker.cross{stroke:#333333;}#mermaid-svg-owTnJz5GJdKXDc5u svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-owTnJz5GJdKXDc5u .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-owTnJz5GJdKXDc5u .cluster-label text{fill:#333;}#mermaid-svg-owTnJz5GJdKXDc5u .cluster-label span{color:#333;}#mermaid-svg-owTnJz5GJdKXDc5u .label text,#mermaid-svg-owTnJz5GJdKXDc5u span{fill:#333;color:#333;}#mermaid-svg-owTnJz5GJdKXDc5u .node rect,#mermaid-svg-owTnJz5GJdKXDc5u .node circle,#mermaid-svg-owTnJz5GJdKXDc5u .node ellipse,#mermaid-svg-owTnJz5GJdKXDc5u .node polygon,#mermaid-svg-owTnJz5GJdKXDc5u .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-owTnJz5GJdKXDc5u .node .label{text-align:center;}#mermaid-svg-owTnJz5GJdKXDc5u .node.clickable{cursor:pointer;}#mermaid-svg-owTnJz5GJdKXDc5u .arrowheadPath{fill:#333333;}#mermaid-svg-owTnJz5GJdKXDc5u .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-owTnJz5GJdKXDc5u .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-owTnJz5GJdKXDc5u .edgeLabel{background-color:#e8e8e8;text-align:center;}#mermaid-svg-owTnJz5GJdKXDc5u .edgeLabel rect{opacity:0.5;background-color:#e8e8e8;fill:#e8e8e8;}#mermaid-svg-owTnJz5GJdKXDc5u .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-owTnJz5GJdKXDc5u .cluster text{fill:#333;}#mermaid-svg-owTnJz5GJdKXDc5u .cluster span{color:#333;}#mermaid-svg-owTnJz5GJdKXDc5u div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-owTnJz5GJdKXDc5u :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}
request

reply

       Client 
     

       RPC 
     

       Server 
     

       Reply 
     
标签: rabbitmq 分布式 AMQP

本文转载自: https://blog.csdn.net/xzlAwin/article/details/140392960
版权归原作者 xzlAwin 所有, 如有侵权,请联系我们删除。

“RabbitMQ的工作模式”的评论:

还没有评论