public ActorMessageEnvelope <P> Send <R, P>(ActorIdentity remoteActor, ActorMessageEnvelope <R> request) { return(Send <R, P>(remoteActor, request, TimeSpan.FromSeconds(30))); }
public ActorMessageEnvelope <P> Send <R, P>(ActorIdentity remoteActor, ActorMessageEnvelope <R> request, TimeSpan timeout) { return(_localActor.SendMessage <R, P>(remoteActor, request, timeout)); }
public P Send <R, P>(ActorIdentity remoteActor, R request) { return(Send <R, P>(remoteActor, request, TimeSpan.FromSeconds(30))); }
public void BeginSend <T>(ActorIdentity remoteActor, ActorMessageEnvelope <T> message) { _localActor.BeginSend(remoteActor, message); }
public async Task ErrorFlowAsync(ActorIdentity currentActor, FlowInstanceId flowId, object payload, Exception exception, CancellationToken cancellationToken) { throw new NotImplementedException(); // var flowProxy = ActorProxy.Create<IFlowService>(new ActorId(flowId.Id), _flowServiceInfo.ServiceUri); // await flowProxy.ErrorFlowAsync(new ActorRequestContext(currentActor.ActorId, BaseFlowActor.ERROR_FLOW_ACTION_NAME, Guid.NewGuid().ToString()), flowId, BaseFlowActor.ERROR_FLOW_ACTION_NAME, null, exception, cancellationToken); }
public Task ErrorStepAsync(ActorIdentity currentActor, FlowInstanceId flowId, Step step, object payload, Exception exception, CancellationToken cancellationToken) { throw new NotImplementedException(); }
public async Task CompleteStepAsync(ActorIdentity currentActor, FlowInstanceId flowId, Step step, object payload, CancellationToken cancellationToken) { throw new NotImplementedException(); // var flowProxy = ActorProxy.Create<IFlowService>(new ActorId(flowId.Id), _flowServiceInfo.ServiceUri); // await flowProxy.SetCurrentStep(new ActorRequestContext(currentActor.ActorId, BaseFlowActor.SET_CURRENT_STEP_ACTION_NAME, Guid.NewGuid().ToString()), flowId, step, cancellationToken); }
public IAsyncResult BeginSend <T>(ActorIdentity remoteActor, ActorMessageEnvelope <T> message, AsyncCallback callback, object state) { return(_localActor.BeginSend(remoteActor, message, callback, state)); }
public void RegisterService(ActorIdentity actor, Type serviceType, IEnumerable <string> tags) { }
public void DeregisterService(ActorIdentity actor, Type serviceType) { }
public Task ChainNextActorAsync <T>(ActorRequestContext nextActorRequestContext, T payload, ActorIdentity actorIdentity, CancellationToken cancellationToken) { return(ChainNextActorAsync(nextActorRequestContext, payload, typeof(T), actorIdentity, cancellationToken)); }
public async Task ChainNextActorAsync(ActorRequestContext nextActorRequestContext, object payload, Type typeOfPayload, ActorIdentity actorIdentity, CancellationToken cancellationToken) { if (actorIdentity?.ActorId == null || actorIdentity?.ActorServiceUri == null) { throw new ArgumentNullException($"MessagingActorClient failed at ChainNextActorAsync due to null of {nameof(actorIdentity)}. The client could not chain to next actor which is null."); } //put more logic on to the orchestration collection later. Now it is just get the single one var proxy = ActorProxy.Create <IBaseMessagingActor>( new ActorId(actorIdentity.ActorId), new Uri(actorIdentity.ActorServiceUri)); var serializedPayload = _binaryMessageSerializer.SerializePayload(payload, typeOfPayload); await proxy.ChainProcessMessageAsync(nextActorRequestContext, serializedPayload, cancellationToken); }
public void EndSend(ActorIdentity remoteActor, IAsyncResult asyncResult) { _localActor.EndSend(remoteActor, asyncResult); }
private void OnOrderStatusChangedNotification(ActorIdentity remoteActor, ActorMessageEnvelope <OrderStatusChangedNotification> message) { _log.DebugFormat("OnOrderStatusChangedNotification, order changed, MessageID[{0}], CorrelationID[{1}].", message.MessageID, message.CorrelationID); }
public async Task CreateFlowAsync(ActorIdentity currentActor, FlowInstanceId flowId, StartFlowRequest startFlowRequest, CancellationToken cancellationToken) { throw new NotImplementedException(); // var flowProxy = ActorProxy.Create<IFlowService>(new ActorId(flowId.Id), _flowServiceInfo.ServiceUri); // await flowProxy.CreateFlowAsync(new ActorRequestContext(currentActor.ActorId, BaseFlowActor.CREATE_FLOW_ACTION_NAME, Guid.NewGuid().ToString()), startFlowRequest, cancellationToken); }
public void Can_serialize_ActorIdentityWithoutActorRef() { var actorIdentity = new ActorIdentity("message", null); AssertEqual(actorIdentity); }
public void Send <T>(ActorIdentity remoteActor, ActorMessageEnvelope <T> message) { Send(remoteActor, message.ToBytes(this.Encoder)); }