Transient (QoS0) subscription use non-durable, auto-delete queues that will be deleted when the client disconnects.
Durable (QoS1) subscriptions use durable queues. Whether the queues are auto-deleted is controlled by the client's clean session flag. Clients with clean sessions use auto-deleted queues, others use non-auto-deleted ones.
subscription_ttl
The subscription_ttl option controls the lifetime of non-clean sessions. This option is interpreted in the same way as the queue TTL parameter, so the value 1800000 means 30 minutes.
prefetch
The prefetch option controls the maximum number of unacknowledged messages that will be delivered. This option is interpreted in the same way as the AMQP prefetch-count field, so a value of 0 means "no limit".
producer queue consumer exchange
A producer is a user application that sends messages.
A queue is a buffer that stores messages.
A consumer is a user application that receives messages.
An exchange is a very simple thing. On one side it receives messages from producers and the other side it pushes them to queues.
direct exchange: a message goes to the queues whose binding key exactly matches the routing key of the message
topic exchange: is similar to a direct one - a message sent with a particular routing key will be delivered to all the queues that are bound with a matching binding key. However there are two important special cases for binding keys:
apache-kafka
更多
http://tim.dysinger.net/posts/2013-09-16-getting-started-with-nanomsg.html
http://www.bravenewgeek.com/a-look-at-nanomsg-and-scalability-protocols/
[ ] rabbitmq http://www.rabbitmq.com/
【架构】关于RabbitMQ
MQTT
Rabbitmq
命令
rabbitmq-plugins, rabbitmq-server, rabbitmqctl
启动: sudo rabbitmq-server & 状态: sudo rabbitmqctl status 停止: sudo rabbitmqctl stop
查看队列: sudo rabbitmqctl list_queues sudo rabbitmqctl list_queues name messages_ready messages_unacknowledged
查看exchange sudo rabbitmqctl list_exchanges
查看binding sudo rabbitmqctl list_bindings
启用插件: sudo rabbitmq-plugins enable rabbitmq_mqtt
sudo rabbitmq-plugins enable rabbitmq_stomp
概念,术语
ACK(Acknowledgement) 即确认字符,在数据通信中,接收站发给发送站的一种传输类控制字符。表示发来的数据已确认接收无误。
MQTT
Transient (QoS0) subscription use non-durable, auto-delete queues that will be deleted when the client disconnects.
Durable (QoS1) subscriptions use durable queues. Whether the queues are auto-deleted is controlled by the client's clean session flag. Clients with clean sessions use auto-deleted queues, others use non-auto-deleted ones.
The subscription_ttl option controls the lifetime of non-clean sessions. This option is interpreted in the same way as the queue TTL parameter, so the value 1800000 means 30 minutes.
The prefetch option controls the maximum number of unacknowledged messages that will be delivered. This option is interpreted in the same way as the AMQP prefetch-count field, so a value of 0 means "no limit".
A producer is a user application that sends messages.
A queue is a buffer that stores messages.
A consumer is a user application that receives messages.
An exchange is a very simple thing. On one side it receives messages from producers and the other side it pushes them to queues.
direct exchange: a message goes to the queues whose binding key exactly matches the routing key of the message
topic exchange: is similar to a direct one - a message sent with a particular routing key will be delivered to all the queues that are bound with a matching binding key. However there are two important special cases for binding keys:
(hash) can substitute for zero or more words.
理解
队列模式:
“立即都模式”: 非持久化非ack: 将礼物”都“分给不同的receiver, ”有先来后到“ round-robin: ”带位置信息的分发模式“: 持久化, ack; 将任务”均“分给不同的task