8 int64_t startedAt,
unsigned char logPriority,
const std::string& iniFile) :
9 Handler(name, ctx, clientIdentity, connectionString, startedAt, logPriority, iniFile){
214 std::string messageId((
const char*)msg.
pop_front().c_str());
216 std::string messageRoute((msg.
parts())?(
const char*)msg.
pop_front().c_str():
"");
221 std::vector<std::string> parts;
223 std::istringstream partsStream(messageId);
224 std::string tmpString;
227 parts.push_back(tmpString);
229 if(parts.size() > 1){
231 msg.
append(parts[0].c_str());
232 msg.
append(parts[1].c_str());
259 std::string clientIdentity((
const char*)clientMsg.
pop_front().c_str());
260 std::string messageId((
const char*)clientMsg.
pop_front().c_str());
262 std::string messageRoute((clientMsg.
parts())?(
const char*)clientMsg.
pop_front().c_str():
"");
275 clientMsg.
append(clientIdentity.c_str());
278 clientMsg.
append(messageRoute.c_str());
303 std::vector<ClientWorkerItem> clients;
310 std::vector<ClientWorkerItem> clientsQueue;
314 std::string route = routesMsg.
build();
333 std::stringstream result;
378 std::stringstream result;
395 std::vector<zmq::pollitem_t> items;
397 items ={{*
_routerServerSock, 0, ZMQ_POLLIN, 0},{*
_inprocReducerOutSock, 0, ZMQ_POLLIN, 0},{*
_inprocAdminSock, 0, ZMQ_POLLIN, 0},{*
_inprocProxySock, 0, ZMQ_POLLIN, 0}};
399 items ={{*
_inprocReducerOutSock, 0, ZMQ_POLLIN, 0},{*
_inprocAdminSock, 0, ZMQ_POLLIN, 0},{*
_inprocProxySock, 0, ZMQ_POLLIN, 0}};
407 if(items[0].revents & ZMQ_POLLIN){
413 if(items[items.size() - 3].revents & ZMQ_POLLIN){
418 if(items[items.size() - 2].revents & ZMQ_POLLIN){
423 if(items[items.size() - 1].revents & ZMQ_POLLIN){
437 if (EINTR!=error.
num()){
438 std::cout <<
"RouterServerProxy E: " << error.
what() <<
std::endl;
440 }
catch(std::exception& e){
441 std::cout <<
"RouterServerProxy E: " << e.what() <<
std::endl;
443 std::cout <<
"RouterServerProxy E: Unknown exception" <<
std::endl;