Esempio n. 1
0
 public ActorServiceRemotingDispatcher(ActorService actorService, IServiceRemotingMessageHandler innerMessageHandler, IActorServiceCommunicationLogger logger)
 {
     _actorService        = actorService;
     _innerMessageHandler = innerMessageHandler;
     _logger = logger;
 }
Esempio n. 2
0
 internal static ActorMessageHeaders GetActorMessageHeaders(this ServiceRemotingMessageHeaders messageHeaders, IActorServiceCommunicationLogger logger)
 {
     try
     {
         ActorMessageHeaders actorMessageHeaders;
         if (ActorMessageHeaders.TryFromServiceMessageHeaders(messageHeaders, out actorMessageHeaders))
         {
             return(actorMessageHeaders);
         }
     }
     catch (Exception ex)
     {
         // ignored
         logger?.FailedToReadActorMessageHeaders(messageHeaders, ex);
     }
     return(null);
 }
 public static ServiceReplicaListener CreateServiceReplicaListener(this ActorService actorService, IActorServiceCommunicationLogger logger)
 {
     return(new ServiceReplicaListener(ctxt =>
                                       (IServiceRemotingListener) new FabricTransportActorServiceRemotingListener(
                                           serviceContext: ctxt,
                                           messageHandler: new ActorServiceRemotingDispatcher(
                                               actorService: actorService,
                                               innerMessageHandler: new Microsoft.ServiceFabric.Actors.Remoting.Runtime.ActorServiceRemotingDispatcher(actorService),
                                               logger: logger),
                                           listenerSettings: new FabricTransportRemotingListenerSettings()
     {
         MaxConcurrentCalls = 1000,
     }
                                           )));
 }