RabbitMq Overview

queue

1. Message persistent
2. Round-robin
3. Message acknowledgment (no_ack in consumer config)
4. Message durability channel.queue_declare(queue='hello', durable=True) 只有在新建queue的时候起效
5. Fair dispatch: prefetch_count=1, 当系统执行完,才会新分配消息

publish & subscribe

1. Exchange type: direct, topic, header, fanout
2. Temporary queue: result = channel.queue_declare(), 当queue和consumer断开链接时需要删除queue,加上参数exclusive=true
3. Binding:channel.queue_bind(exchange='logs',queue=result.method.queue)

Routing

1. Routing key
2. Direct change: can filter message (some kind of)
3. Multiple binding
4. Emitting logs
5. Subscribing
6. All in one:  exchange + routing key ⇒ routing key + temporary queue

Topic

1. Topic exchange: binding keys: * #
2. topic send to queue according to binding key match (like regular expression)

RPC

1. Client interface
2. call back queue
3. Corr_id

你可能感兴趣的:(rabbitmq)