0% found this document useful (0 votes)
72 views151 pages

Rabbit MQ

The document discusses distributed messaging and RabbitMQ. It provides diagrams illustrating different RabbitMQ architectures including standalone nodes, clusters, exchanges, queues, and consumers. It shows how RabbitMQ can provide messaging across multiple servers and high availability through techniques like mirroring and load balancing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views151 pages

Rabbit MQ

The document discusses distributed messaging and RabbitMQ. It provides diagrams illustrating different RabbitMQ architectures including standalone nodes, clusters, exchanges, queues, and consumers. It shows how RabbitMQ can provide messaging across multiple servers and high availability through techniques like mirroring and load balancing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 151

Distributedmessagingforeveryone

AlvaroVidela
JasonJ.W .Williams
FOREWORDBY
ALEXISR
IC
HAR
DSO
N
M ANNING
SHELTER ISLAND


■ ■
■ ■

■ ■


■ ■


■ ■



Next message ID
Channel 1: 3
Channel 2: 2
Queue 1
m eta d a ta
q ueue na m e
d ura b le ?
a uto -d ele te ?
ow ne r no d e

Q ue ue 1
c ontents

Queue 1 Queue 1
m eta d a ta m etad a ta
Q ueue 1
c o ntents
Queue 1
m etad a ta Ra b b itMQ Queue 1 Ra b b itMQ
m eta d a ta
Queue 1 no d e no d e
c o ntents
Ra b b itMQ
sta nd a lo ne Ra b b itMQ
no d e no d e

Cluster
Exc ha ng e A Exc ha ng e A
routing _key1 routing _key1
routing _key 2 routing _ke y 2
routing _key 3 routing _ke y 3

Queue 1 m etad ata Queue 1 m eta d ata

Queue 1 c ontents Exc ha ng e A


ro uting _key1
ro uting _key 2
Ra b b itMQ Ra b b itMQ
ro uting _key 3
c luster c luster

Queue 1 m eta da ta

Ra b b itMQ
c luster
q ue ue .d e c la re
m y_queue

RAM

Ra b b itMQ
q ue ue .d e c la re
d isk nod e
m y_q ueue

Disk

Ra b b itMQ
RAM nod e RAM
Exc ha ng e A

Q ueue 1 Queue 2 Queue 3

Ra bb itMQ Ra bb itMQ Ra bb itMQ


ra b b [email protected] ra b b [email protected] ra b b [email protected]

EC2 server 1 EC2 server 2 EC2 server 3


10.1.59.1 10.1.63.4 10.1.70.10

Ra b b itMQ c luster
Master Slave
copy copy

(mirrored) (mirrored)
Custom er

Custom er sees: w w w

w eb 1 web2 w eb 3
Consume r Pro d uc e r
app app

C lient se es: lo c a lho st:5670

Exc ha nge A Exc ha ng e A Exc ha ng e A

Queue 1 Queue 2 Queue 3


Ra bb itMQ Ra bb itMQ Ra bb itMQ
ra b b it@loc a lho st ra b b it_1@lo c a lhost ra b b it_2@lo c a lhost
lo c a lho st:5672 loc a lho st:5673 loc a lho st:5674

loc alhost
Consume r Consum e r Co nsum e r
#1 #2 #3

Exc ha ng e A Exc ha ng e A Exc ha ng e A

Que ue 1 Queue 2 Queue 3


Ra bb itMQ Ra bb itMQ Ra bb itMQ
ra b b it@loc a lhost ra b b it_1@loc a lhost ra b b it_2@lo c a lhost
loc a lhost:5672 loc a lho st:5673 loc a lho st:5674

loc a lhost
Co nsumer

Sec ond a ry nod e


Prima ry node (only used if
p rim a ry fa ils)

Exc ha ng e A Exc ha ng e B

Q ueue 1 Que ue 2

Ra b b itMQ Ra b b itMQ
sta nd a lo ne server sta nd a lone server
ra b b it_a @loc a lhost ra b b it_b @loc a lhost
Consum er

Virtua l IP: 10.1.61.1

Pa c em a ker
Exc hange A (c o ntrol virtua l IP, Exc ha ng e A
stora g e ow ner,
sta rts sta nd b y
ra b b it)

Q ue ue 1 Queue 1
Ra b b itMQ Ra b b itMQ
sta nd a lone server sta nd a lone server
ra b b [email protected] ra b b [email protected]

Sha red stora g e

You might also like