Spring.Messaging.Nms.Listener.Adapter.MessageListenerAdapter.GetResponseDestination C# (CSharp) Метод

GetResponseDestination() защищенный Метод

Determine a response destination for the given message.

The default implementation first checks the JMS Reply-To Destination of the supplied request; if that is not null it is returned; if it is null, then the configured DefaultResponseDestination default response destination is returned; if this too is null, then an InvalidDestinationExceptionis thrown.

if thrown by NMS API methods if no destination can be determined.
protected GetResponseDestination ( IMessage request, IMessage response, ISession session ) : IDestination
request IMessage The original incoming message.
response IMessage The outgoing message about to be sent.
session ISession The session to operate on.
Результат IDestination
        protected virtual IDestination GetResponseDestination(IMessage request, IMessage response, ISession session)
        {
            IDestination replyTo = request.NMSReplyTo;
            if (replyTo == null)
            {
                replyTo = ResolveDefaultResponseDestination(session);
                if (replyTo == null)
                {
                    throw new InvalidDestinationException("Cannot determine response destination: " +
                            "Request message does not contain reply-to destination, and no default response destination set.");
                }
            }
            return replyTo;
        }