最近在看QPID
首先看下QPID是什么,他是个消息队列,用他有什么好处呢 ,可以跨平台使用,比如业务部分用C实现,把需要共享的信息通过QPID来传递,然后JAVA侧再从QPID接受消息
QPID官网:
http://qpid.apache.org/download.html
JAVA开发的话可以先在官网上下载一个 Java broker, client & tools qpid-java-0.20.tar.gz [PGP]
bin/qpid-server.bat 就可以启动
后面先研究如下几点
1、java开发服务端
研究几点,点对点的消息 、广播消息
2、java开发客户端
点对点消息的接收,接收后如何删除已经读取过的消息,使用 message.acknowledge()
广播消息的接收
消息格式的解析,一般采用字符串格式
3、qpid是否有tool可以看到当前的缓存情况
可以使用 qpid-jmx-management-console-0.18-win32-win32-x86.zip
下载地址 :http://www.eu.apache.org/dist/qpid/0.18/
4、QPID的性能问题,比如一个缓存队列的最大记录数,qpid开启时候设置jdk的虚拟内存等等
表 1. AMQP 的几个概念
概念 描述
Producer A program that writes messages to an Exchange. To do this, the program creates a message, fills the message with content, gives the message a Routing Key, and sends the message to an Exchange.
Routing Key A string that the Exchangecan use to determine to which Queuesthe message should be delivered.
Exchange Accepts messages from Producersand routes them to Queuesif the message meets the criteria expressed in a binding.
Binding Defines the relationship between an Exchangeand a Queue, specifying which messages should be routed to a given Queue
Queue Holds messages and delivers them to the Consumersthat subscribe to the Queue.
Consumer A program that reads messages from a Queue. A Consumercan create, subscribe to, share, use, or destroy Queueand their Bindings(as long as it has have permission to do so).
为了支持各种常见的通信模型,AMQP 定义了不同的 Exchange 类型,如下表所示 :
表 2. AMQP 定义的 Exchange 类型
Exchange 类型 路由行为
Fan-Out Messages are routed to every Queue bound to the Exchange, ignoring the Routing Key
Direct A message is routed only if a Queue's Binding Keyis the same as the message's Routing Key
Topic Similar to a Direct Exchange, but it supports multipart keys that contain multiple words separated by the "." delimiter; for instance, a message Producer can create messages with Routing Keys like usa.news, usa.weather, europe.news, and europe.weather.
参考资料
消息中间件 Apache Qpid 简介,第 1-2 部分
http://www.ibm.com/developerworks/cn/opensource/os-cn-qpid1/index.html
http://www.ibm.com/developerworks/cn/opensource/os-cn-qpid2/index.html
刚刚才开始研究! 等后面再补充吧
export PYTHONPATH=/usr/local/bin/qpid-tools-0.18/python/:/usr/local/bin/qpid-tools-0.18/src/py/
cd /usr/local/bin/qpid-tools-0.18/src/py/
./qpid-stat -q
qpidd --max-connections 2048 --auth no -d --log-to-file /var/log/mbus.log --log-enable warning+
- 大小: 39.9 KB
分享到:
相关推荐
Qpid入门学习,内含有全套下载、安装流程,以及原理说明
qpid rpm包 带依赖 直接yum localinstall qpid-cpp-server-1.39.0-1.el7.x86_64.rpm 就能安装
利用qpid cluster实现Qpid高可用配置.docx
描述基于AMQP协议开发的Qpid消息中间件的实现原理及优势
Qpid linux安装
查看所有队列包括消息的信息 qpid-stat -q 查看指定队列信息 qpid-stat -q | grep pingpong
qpid jar包!
win8下vs2010编译qpid-cpp-server 0.3
Qpid Broker-J [ ] [ ] Qpid CPP [ ] [ ] Qpid Dispatch [ ] [ ] Qpid JMS [ ] [ ] Qpid JMS AMQP 0-x [ ] [ ] Qpid Proton [ ] [ ] Qpid Proton-J [ ] [ ] Qpid Python [ ] [ ] Qpid Interop测试[ ] [ ] Qpid网站
linux下qpid的详细安装步骤及启动命令
Qpid/C++ 是AMQP协议的一个 C++ 的实现。Apache Qpid (Open Source AMQP Messaging) 是一个跨平台的企业通讯解决方案,实现了高级消息队列协议。提供了 Java、C++ 两种服务端版本以及 Java、C++、.NET、Python和Ruby...
官方离线安装包,亲测可用
开源项目-bbqgophers-qpid.zip,We had a blast this weekend building this controller for BBQ Grills in Go.
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
官方离线安装包,亲测可用
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
官方离线安装包,测试可用。使用rpm -ivh [rpm完整包名] 进行安装
官方离线安装包,亲测可用。使用rpm -ivh [rpm完整包名] 进行安装