public override void Log(IDictionary <string, object> moduleLog) { var brokerLog = new MessageBrokerLog(this.Exchanges, _messageConsumers); brokerLog.LogMessageExchanges(moduleLog); brokerLog.LogMessageConsumers(moduleLog); var brokerDetailLog = new Dictionary <string, object>(); moduleLog["Broker Details"] = brokerDetailLog; _messageBroker.LogDetails(brokerDetailLog); }
public void LogDetails(IDictionary <string, object> log) { var rpcMessages = _brokerState.RpcTypes.Values .Select(msgType => { var msgAttrib = msgType.GetAttribute <RpcCommandAttribute>(); return(new { RpcMessageType = msgType, msgAttrib.BrokerName, msgAttrib.RequestQueueKey }); }); // Associate the RPC message command with the publisher that dispatches to the consumer. log["RPC Messages"] = (from rpcMsg in rpcMessages join rpcPub in _rpcMessagePublishers on new { rpcMsg.BrokerName, rpcMsg.RequestQueueKey } equals new { rpcPub.BrokerName, rpcPub.RequestQueueKey } select new { rpcMsg.RpcMessageType, rpcPub.BrokerName, rpcPub.RequestQueueKey, rpcPub.RequestQueueName, rpcPub.Client.ReplyQueueName, Channel = MessageBrokerLog.LogChannel(rpcPub.Client.Channel) }).ToDictionary(msgPub => msgPub.RpcMessageType); }