Skip to content

Instantly share code, notes, and snippets.

@ericthorsen
Created December 11, 2011 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericthorsen/1460532 to your computer and use it in GitHub Desktop.
Save ericthorsen/1460532 to your computer and use it in GitHub Desktop.
routing a MIP record
private void server_MIPRecordDequeued(MIPQueueRecord record)
{
try
{
if (record.OutBoundDocQueueID != -1)
_lastDocumentID = record.OutBoundDocQueueID;
//Profile list exists for private sweep or retran
if (record.ProfileList != null)
{
foreach(int profileID in record.ProfileList)
{
MIPClient client = _clientMappings.GetClientForProfile(profileID);
if(client != null && client.Profile.IsPrivate)
sendClientMessage(client, record);
}
}
else
{
ICollection clients = _clientMappings.GetClientsForTopic(record.TopicKey);
if (clients != null)
{
foreach (MIPClient client in clients)
{
//Always want to send pulse
//Do not want to send public transmission to private profile
//??if(record.DocTypeID == DocTypes.pulse || !client.Profile.IsPrivate)
sendClientMessage(client, record);
}
}
}
}
catch(Exception exc)
{
SystemLog.Publish(exc);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment