public IEnumerable <NodeHeartbeatOutput> Create(NodeHeartbeatInput input) { if (input == null) { Logger.Error($"{nameof(input)} should not be null."); return(Enumerable.Empty <NodeHeartbeatOutput>()); } CreateHeartbeat(input); RefreshOnlineStatus(input); DbContext.SaveChanges(); var messages = _messageAppService.Consume(input.NodeId); return(Mapper.Map <IEnumerable <NodeHeartbeatOutput> >(messages)); }