tortoise icon indicating copy to clipboard operation
tortoise copied to clipboard

unknown registery: Tortoise.Regsitry

Open TKTheTechie opened this issue 2 years ago • 1 comments

Hi All,

I'm trying to run a sample program using the following code:

 {ok, _pid} =
  Tortoise.Connection.start_link(
    client_id: HelloWorld,
    server: {Tortoise.Transport.Tcp, host: "localhost", port: 1883},
    handler: {Tortoise.Handler.Logger, []}
  )

It returns an error:

== Compilation error in file lib/elixir_solace.ex ==
** (ArgumentError) unknown registry: Tortoise.Registry
    (elixir 1.12.3) lib/registry.ex:1341: Registry.key_info!/1
    (elixir 1.12.3) lib/registry.ex:227: Registry.whereis_name/2
    (stdlib 3.16.1) gen.erl:84: :gen.start/6
    lib/elixir_solace.ex:5: (module)

How do I resolve this?

TKTheTechie avatar Jan 20 '22 23:01 TKTheTechie

Use Tortoise.Supervisor.start_child instead Tortoise.Connection.start_link

sleipnir avatar Apr 15 '22 19:04 sleipnir