RabbitMq中的交换机
Headers exchange – 还没有仔细研究过,复制点官方的介绍吧。
A headers exchange is designed to for routing on multiple attributes that are more easily expressed as message headers than a routing key. Headers exchanges ignore the routing key attribute. Instead, the attributes used for routing are taken from the headers attribute. A message is considered matching if the value of the header equals the value specified upon binding.
It is possible to bind a queue to a headers exchange using more than one header for matching. In this case, the broker needs one more piece of information from the application developer, namely, should it consider messages with any of the headers matching, or all of them? This is what the "x-match" binding argument is for. When the "x-match" argument is set to "any", just one matching header value is sufficient. Alternatively, setting "x-match" to "all" mandates that all the values must match.
Headers exchanges can be looked upon as "direct exchanges on steroids". Because they route based on header values, they can be used as direct exchanges where the routing key does not have to be a string; it could be an integer or a hash (dictionary) for example.
消息始终都是先发送到交换机,由交换级经过路由传送给队列,消费者再从队列中获取消息的! 参考资料:http://melin.iteye.com/blog/691265推荐阅读
-
DOM【介绍、HTML中的DOM、XML中的DOM】
-
php中的路径问题与set_include_path使用介绍
-
mysql中内存的使用与分配_MySQL
-
ae中想要制作渐隐为黑色过场的效果?
-
编写一个函数reverse_string(char * string)(递归实现)实现:将参数字符串中的字符反向排列。 要求:不能使用C函数库中的字符串操作函数
-
php升级 - 正在运行中的服务器,如何平滑从php5.2升级到php5.3 ,linux+php-fpm+nginx
-
学习php中的正则表达式_php实例
-
在PHP中检查PHP文件是否有语法错误的方法
-
Linux和Windows平台下PHP中PDF支持库的安装及应用案例_PHP
-
在服务器的mysql中创建自定义函数出错