Exemplo n.º 1
0
        public D ResolveDestination(string name)
        {
            _resolvedDestinationCache.TryGetValue(name, out var destination);
            if (destination == null)
            {
                destination = _targetDestinationResolver.ResolveDestination(name);
                _resolvedDestinationCache.TryAdd(name, destination);
            }

            return(destination);
        }
Exemplo n.º 2
0
        private void PopulateChannel()
        {
            if (_messagingTemplate.DefaultDestination == null)
            {
                if (_channel == null)
                {
                    var recoveryChannelName = ChannelName;
                    if (recoveryChannelName == null)
                    {
                        recoveryChannelName = IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME;
                    }

                    if (_channelResolver != null)
                    {
                        _channel = _channelResolver.ResolveDestination(recoveryChannelName);
                    }
                }

                _messagingTemplate.DefaultDestination = _channel;
            }
        }