0

I got an actor on my local servicefabric cluster, I try to delete it when job is done from my stateless service. I use RemotingListenerVersion.V2.

  var actor = ActorServiceProxy.Create(new Uri($"{_applicationName}/{_actorServiceName}"), actorId);
              await actor.DeleteActorAsync(actorId, CancellationToken.None);

then I receive an exception:

{"NamedEndpoint 'V2Listener' not found in the address '{\"Endpoints\":{\"\":\"my-localhost.pl:30004+ea7448c4-2a32-4c48-8ac9-cb23b6bd6269-131849397597858002-a68d72c7-2387-4390-8170-49b38127c0d1\"}}' for partition 'xxxx-xxx-xxxx-8ac9-cb23b6bd6269'"}

my actor manifest:

<StatefulServiceType ServiceTypeName="ActorServiceActorServiceType" HasPersistedState="true">
      <Extensions>
        <Extension Name="__GeneratedServiceType__" GeneratedId="c0c20ebd-xxx-xxx-xxx-ebaa99dce8ed|Persisted">
          <GeneratedNames xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
            <DefaultService Name="xxxActorService" />
            <ReplicatorEndpoint Name="xxxxActorServiceActorServiceReplicatorEndpoint" />
            <ReplicatorConfigSection Name="xxxxActorServiceReplicatorConfig" />
            <ReplicatorSecurityConfigSection Name="xxxxxActorServiceActorServiceReplicatorSecurityConfig" />
            <StoreConfigSection Name="xxxxxActorServiceActorServiceLocalStoreConfig" />
            <ServiceEndpointV2 Name="xxxxxActorServiceActorServiceEndpointV2" />
            <ServiceEndpointV2 Name="ServiceEndpointV2" />
            <Endpoint Name="ServiceEndpointV2" />
          </GeneratedNames>
        </Extension>
      </Extensions>
    </StatefulServiceType>
    <CodePackage Name="Code" Version="1.0.0">
    <EntryPoint>
      <ExeHost>
        <Program>xxxxxxx.exe</Program>
      </ExeHost>
    </EntryPoint>
  </CodePackage>
  <ConfigPackage Name="Config" Version="1.0.0" />
  <Resources>
    <Endpoints>
      <Endpoint Name="xxxxxxxEndpointV2" />
      <Endpoint Name="xxxxxxxEndpoint" />
      <Endpoint Name="ServiceEndpointV2"   />
    </Endpoints>
  </Resources>
  <!-- The content will be generated during build -->
</ServiceManifest>

What I'm doing wrong? Why actor endpoint name is empty (value is correct)?

not_you
  • 31
  • 4

1 Answers1

0

I checked CreateServiceInstanceListeners method

protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners()
        {
            return new[]
            {
                new ServiceInstanceListener(
                    context =>
                    new FabricTransportServiceRemotingListener(
                        context,
                        serviceRemotingMessageHandler: new MiddlewareServiceRemotingMessageDispatcher(
                            context,
                            this,
                            middlewareAction: MiddlewareAction,
                            serviceRemotingMessageBodyFactory: new JsonMessageFactory()),
                        serializationProvider: new ServiceRemotingJsonSerializationProvider()))
            };
    }

I noticed that I miss to set "name" parameter. When I set it, everything goes well. Solved.

not_you
  • 31
  • 4