eis/inc/zmqc/ConsumerMQ.h

45 lines
946 B
C
Raw Normal View History

#ifndef __ConsumerMQ_h__
#define __ConsumerMQ_h__
#include <common/Macro.h>
#include <common/L2Event.h>
#include <log4cplus/LOG.h>
#include <proxy/MessageICE.h>
//#include <mqhsv/MqEWatcher.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <IceUtil/Thread.h>
//#include "T_LOV_JUDGE.h"
//#include "T_LOV_STEELGRADE.h"
#include <glob/ProxyMag.h>
using namespace std;
using namespace baosight;
using namespace IceUtil;
class ConsumerMQ: public Thread
{
public:
ConsumerMQ(string url,string topicname,bool booltopic,string proxyname);
~ConsumerMQ();
string ListeningTopic(const string& topicName);
string ListeningQueue(const string& queueName);
void SendTopic(const string& topicName,string data);
virtual void run();
private:
string m_user;
string m_password ;
string m_url;
int m_port;
string m_topicname;
bool m_istopic;
bool m_alive;
MessageICEPrx m_proxy;
};
#endif