虚拟机模块 更多...
#include <host.hpp>
Public 类型 | |
| using | ptr = std::shared_ptr< VirtualHost > |
Public 成员函数 | |
| VirtualHost (const std::string hname, const std::string &basedir, const std::string &dbfile) | |
| 虚拟机构造函数 恢复历史消息 | |
| bool | declareExchange (const std::string &name, ExchangeType type, bool durable, bool auto_delete, const google::protobuf::Map< std::string, std::string > &args) |
| 声明交换机 | |
| void | deleteExchange (const std::string &name) |
| 删除交换机 | |
| bool | declareQueue (const std::string &qname, bool qdurable, bool qexclusive, bool qauto_delete, const google::protobuf::Map< std::string, std::string > &qargs) |
| 声明消息队列 | |
| void | deleteQueue (const std::string &name) |
| 删除消息队列 | |
| bool | bind (const std::string &ename, const std::string &qname, const std::string &key) |
| 添加绑定信息 | |
| void | unbind (const std::string &ename, const std::string &qname) |
| 解除绑定信息 | |
| MsgQueueBindingMap | exchangeBindings (const std::string &ename) |
| 获取交换机绑定信息 | |
| QueueMap | allQueues () |
| 获取所有队列 | |
| bool | basicPublish (const std::string &qname, BasicProperties *bp, const std::string &body) |
| 向指定队列插入新消息 | |
| MessagePtr | basicConsume (const std::string &qname) |
| 获取队头消息 | |
| void | basicAck (const std::string &qname, const std::string &msg_id) |
| 应答消息 | |
| Exchange::ptr | selectExchange (const std::string &ename) |
| 获取指定交换机句柄 | |
| void | clear () |
| 清理 | |
| bool | existsExchange (const std::string &name) |
| 判断交换机是否存在 | |
| bool | existsQueue (const std::string &name) |
| 判断队列是否存在 | |
| bool | existsBinding (const std::string &ename, const std::string &qname) |
| 判断绑定信息是否存在 | |
Private 属性 | |
| std::string | _host_name |
| ExchangeManager::ptr | _emp |
| 交换机管理指针 | |
| MsgQueueManager::ptr | _mqmp |
| 消息队列管理指针 | |
| BindingManager::ptr | _bmp |
| 绑定信息管理指针 | |
| MessageManager::ptr | _mmp |
| 消息管理指针 | |
虚拟机模块
| using XuMQ::VirtualHost::ptr = std::shared_ptr<VirtualHost> |
|
inline |
虚拟机构造函数 恢复历史消息
| hname | 虚拟机名称 |
| basedir | 基础目录 |
| dbfile | 数据库目录 |
|
inline |
应答消息
| qname | 消息队列名称 |
| msg_id | 消息id |
|
inline |
获取队头消息
| qname | 消息队列名称 |
|
inline |
向指定队列插入新消息
| qname | 消息队列名称 |
| bp | 消息属性 |
| body | 消息主体 |
|
inline |
添加绑定信息
| ename | 交换机名称 |
| qname | 消息队列名称 |
| key | 绑定关键字 |
|
inline |
清理
|
inline |
声明交换机
| name | 交换机名称 |
| type | 交换机类型 |
| durable | 数据持久化标志 |
| auto_delete | 自动删除标志 |
| args | 其他参数 |
|
inline |
声明消息队列
| qname | 消息队列名称 |
| qdurable | 数据持久化标志 |
| qexclusive | 独占标志 |
| qauto_delete | 自动删除标志 |
| qargs | 其他参数 |
|
inline |
删除交换机
| name | 交换机名称 |
|
inline |
删除消息队列
| name | 消息队列名称 |
|
inline |
|
inline |
判断绑定信息是否存在
| ename | 交换机名称 |
| qname | 队列名称 |
|
inline |
判断交换机是否存在
| name | 交换机名称 |
|
inline |
判断队列是否存在
| name | 队列名称 |
|
inline |
获取指定交换机句柄
| ename | 交换机名称 |
|
inline |
解除绑定信息
| ename | 交换机名称 |
| qname | 消息队列名称 |
|
private |
绑定信息管理指针
|
private |
交换机管理指针
|
private |
|
private |
消息管理指针
|
private |
消息队列管理指针