class CTNLuaRabbitMQ
{
public:
    CTNLuaRabbitMQ();
    ~CTNLuaRabbitMQ();

    void setLuaID(int iID);
    void setLua(CLuaScript* pLua);

    void setServer(const string& sIP, int iPort = 5672, const string& sUser = "guest", const string& sPass = "guest");

    //发布消息
    bool publish(const string& sMsg, const string& sQue, const string& exchange = "");

    //订阅消息
    bool consumer(const string& sQue = "");
    bool stopConsumer();

    //不存在则增加
    string getConsume(const string& sQue);

    //增加队列,如果不存的的话
    bool addQue(const string& sQue);

    //删除队列
    bool delQue(const string& sQue);

};
Copyright © TouchNet 2015 all right reserved,powered by Gitbook最后修订时间: 2022-06-21 09:21:04

results matching ""

    No results matching ""