Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.18 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.18 KB

Akka Remoting Akka.Hosting Extensions

WithRemoting() Method

An extension method to add Akka.Remote support to the ActorSystem.

public static AkkaConfigurationBuilder WithRemoting(
    this AkkaConfigurationBuilder builder,
    string hostname = null,
    int? port = null,
    string publicHostname = null,
    int? publicPort = null);

Parameters

  • hostname string

    Optional. The hostname to bind Akka.Remote upon.

    Default: IPAddress.Any or "0.0.0.0"

  • port int?

    Optional. The port to bind Akka.Remote upon.

    Default: 2552

  • publicHostname string

    Optional. If using hostname aliasing, this is the host we will advertise.

    Default: Fallback to hostname

  • publicPort int?

    Optional. If using port aliasing, this is the port we will advertise.

    Default: Fallback to port

Example

using var host = new HostBuilder()
    .ConfigureServices((context, services) =>
    {
        services.AddAkka("remotingDemo", (builder, provider) =>
        {
            builder.WithRemoting("127.0.0.1", 4053);
        });
    }).Build();

await host.RunAsync();