public void ReceiveAcknowledgementFor(MessagePayload messagePayload)
 {
     ReceiveMessage(
         new MessagePayload()
             .AsAcknowlegement(messagePayload.GetPersistenceId())
             .SetToChannel(messagePayload.GetFromAddress().Channel));
 }
 protected static void LogMessage(MessagePayload toInput)
 {
     Logger.Debug(
         "Repeating message: {0} on {1} with sequence {2}",
         toInput.Id,
         toInput.HasHeader<FromAddressHeader>() ? toInput.GetFromAddress().Channel : "n/a",
         toInput.HasSequence() ? toInput.GetSequence().ToString() : "n/a");
 }
        public void HandleMessage(MessagePayload toHandle, List<MessagePayload> outgoingMessages)
        {
            if (!toHandle.IsDirectChannelMessage()) return;

            using (var context = new DirectReplyContext(toHandle.GetToAddress(), toHandle.GetFromAddress()))
            {
                messageReceiver.InputMessage(toHandle);
                outgoingMessages.AddRange(context.GetCurrentReplies());
            }
        }
 public override void InputMessage(MessagePayload toInput)
 {
     ReassignServerAddressIfRegistered(toInput.GetFromAddress().Server);
     OnMessageProcessed(toInput);
 }
 void RegisterFromServerAsAuthenticated(MessagePayload toInput)
 {
     registry.Register(toInput.GetFromAddress().Server);
 }
 protected override EndpointAddress GetAddress(MessagePayload toInput)
 {
     return toInput.GetFromAddress();
 }
 void SetCurentSenderAddress(MessagePayload toInput)
 {
     this.addressLookup.SetCurrentSenderAddress(toInput.GetFromAddress());
 }