RabbitMQ 简单总结

2018-04-26  本文已影响0人  lxian2shell

Queue

message buffer. consumer reads messages from Queue.

Exchange

producer sends messages to Exchange. And Exchange will route messages to Queues.

types

Message

message carries a routing key. eg. "log", "quick.brown.fox"

Routing Key

Exchange uses Routing Key to decide wich queue the message should be delivered to.

Bind

bind a queue to a specific exchange ( and possibly a binding key)

binding key

the key/pattern exchange uses to match a routing key

Topic

带通配符的binding key. * - matches a word. # - matches 0 or more words

eg.

[producer] -[Msg (routing key "error"/"info")]
            |
            -> [Exchange "log"] -[Msg "error"]-> [Queue (bind Exchange log, key "error")]
                |
                -> [Msg "info"] -> [Queue (bind exchange "log", key "info"]

上一篇 下一篇

猜你喜欢

热点阅读