mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Include device ID in the zeromq socket identity.
For request sockets in ZeroMQ the socket identity must be unique, otherwise multiple clients will be rejected. Update the tests to test this use case.
This commit is contained in:
@@ -98,7 +98,7 @@ void FairMQDevice::InitWrapper()
|
||||
|
||||
if (!fCmdSocket)
|
||||
{
|
||||
fCmdSocket = fTransportFactory->CreateSocket("pub", "device-commands", fNumIoThreads);
|
||||
fCmdSocket = fTransportFactory->CreateSocket("pub", "device-commands", fNumIoThreads, fId);
|
||||
fCmdSocket->Bind("inproc://commands");
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ bool FairMQDevice::InitChannel(FairMQChannel& ch)
|
||||
{
|
||||
LOG(DEBUG) << "Initializing channel " << ch.fChannelName << " (" << ch.fType << ")";
|
||||
// initialize the socket
|
||||
ch.fSocket = fTransportFactory->CreateSocket(ch.fType, ch.fChannelName, fNumIoThreads);
|
||||
ch.fSocket = fTransportFactory->CreateSocket(ch.fType, ch.fChannelName, fNumIoThreads, fId);
|
||||
// set high water marks
|
||||
ch.fSocket->SetOption("snd-hwm", &(ch.fSndBufSize), sizeof(ch.fSndBufSize));
|
||||
ch.fSocket->SetOption("rcv-hwm", &(ch.fRcvBufSize), sizeof(ch.fRcvBufSize));
|
||||
|
Reference in New Issue
Block a user