public void PublishResponse(string command, Guid workerId, object body)
{
Queue queue;
if (!_queues.TryGetValue(workerId, out queue))
{
queue = new Queue();
_queues.Add(workerId, queue);
}
//TODO: PROJECTIONS: Remove before release
if (!Logging.FilteredMessages.Contains(command))
{
Log.Debug("PROJECTIONS: Scheduling the writing of {0} to {1}. Current status of Writer: Busy: {2}", command, "$projections-$" + workerId, queue.Busy);
}
queue.Items.Add(new Queue.Item { Command = command, Body = body });
if (!queue.Busy)
{
EmitEvents(queue, workerId);
}
}