Increase maximum number of zeromq sockets and improve output on errors.

FairMQSampler: Modified: comment out an unused loop.
FairMQ: Modified: increase maximum number of ZeroMQ sockets (from default 1024).
FairMQ: Modified: reduce amount of output when finding port from a range.
FairMQ: Modified: stop the Device when socket creation fails and output an error.
This commit is contained in:
Alexey Rybalchenko
2015-03-14 17:03:21 +01:00
committed by Florian Uhlig
parent 8a82afe184
commit 61f24eb73a
4 changed files with 39 additions and 7 deletions

View File

@@ -42,17 +42,26 @@ FairMQSocketNN::FairMQSocketNN(const string& type, int num, int numIoThreads)
// http://250bpm.com/blog:14
// http://www.freelists.org/post/nanomsg/a-stupid-load-balancing-question,1
fSocket = nn_socket(AF_SP_RAW, GetConstant(type));
if (fSocket == -1)
{
LOG(ERROR) << "failed creating socket #" << fId << ", reason: " << nn_strerror(errno);
exit(EXIT_FAILURE);
}
}
else
{
fSocket = nn_socket(AF_SP, GetConstant(type));
if (fSocket == -1)
{
LOG(ERROR) << "failed creating socket #" << fId << ", reason: " << nn_strerror(errno);
exit(EXIT_FAILURE);
}
if (type == "sub")
{
nn_setsockopt(fSocket, NN_SUB, NN_SUB_SUBSCRIBE, NULL, 0);
}
}
LOG(INFO) << "created socket #" << fId;
}