public Channel(CompositeMessageLogger logger, SubscriberAddress address, Uri replyUri, ISendingAgent agent) { LocalReplyUri = replyUri; _logger = logger; _address = address; _agent = agent; }
public when_building_an_envelope_for_scheduled_send() { theOriginal = ObjectMother.Envelope(); theOriginal.ExecutionTime = DateTime.UtcNow.Date.AddDays(2); theOriginal.Destination = "tcp://server3:2345".ToUri(); theSubscriber = Substitute.For <ISendingAgent>(); theScheduledEnvelope = theOriginal.ForScheduledSend(theSubscriber); }
public StaticRoute(ISendingAgent agent, WriterCollection <IMessageSerializer> writers, MessageTypeRouting routing) { _agent = agent; _endpoint = agent.Endpoint; _writers = writers; _routing = routing; // TODO -- select the right serializer for the endpoint // hard-coding to JSON for now _writer = writers.ChooseWriter("application/json"); }
public static Envelope ForScheduledSend(this Envelope envelope, ISendingAgent sender) { return(new Envelope(envelope, EnvelopeReaderWriter.Instance) { Message = envelope, MessageType = TransportConstants.ScheduledEnvelope, ExecutionTime = envelope.ExecutionTime, ContentType = TransportConstants.SerializedEnvelope, Destination = TransportConstants.DurableLocalUri, Status = EnvelopeStatus.Scheduled, OwnerId = TransportConstants.AnyNode, Sender = sender, Data = envelope.Serialize() }); }
public void AddStaticRoute(ISendingAgent agent) { var route = new StaticRoute(agent, Writers, this); _routes.Add(route); }
public void AddSendingAgent(ISendingAgent sendingAgent) { _senders = _senders.AddOrUpdate(sendingAgent.Destination, sendingAgent); }
public Channel(CompositeMessageLogger logger, ISendingAgent agent, Uri replyUri) : this(logger, new SubscriberAddress(agent.Destination), replyUri, agent) { }
public void StartSending(IMessageLogger logger, ISendingAgent agent, Uri replyUri) { ReplyUri = replyUri; _logger = logger; _agent = agent; }
public EnvelopeRouter(IMessagingRoot root) { _root = root; _durableLocalQueue = root.Runtime.GetOrBuildSendingAgent(TransportConstants.DurableLocalUri); }
public void Start(IPersistence persistence, IWorkerQueue workers) { _durable = persistence.BuildLocalAgent(TransportConstants.DurableLoopbackUri, workers); _lightweight = new LoopbackSendingAgent(TransportConstants.LoopbackUri, workers); }
public Channel(ISendingAgent agent, Uri replyUri) : this(new SubscriberAddress(agent.Destination), replyUri, agent) { }
public Channel(SubscriberAddress address, Uri replyUri, ISendingAgent agent) { LocalReplyUri = replyUri; _address = address; _agent = agent; }
public void Start(IMessagingRoot root) { _durable = root.BuildDurableLoopbackAgent(TransportConstants.DurableLoopbackUri); _lightweight = new LoopbackSendingAgent(TransportConstants.LoopbackUri, root.Workers); }