elsa icon indicating copy to clipboard operation
elsa copied to clipboard

Starting Multiple Topic Producers is Broken

Open c-h- opened this issue 3 years ago • 2 comments

Hi, thanks for this great library.

With {:elsa, "~> 1.0.0-rc.1"} I'm not able to start multiple topic producers as stated in the configuration.

This configuration worked as of 4410bf6c832c7736eb5206a5f1133c623dae9f8d but broke with 4a980b145d4c4ce2c4d6a9a4780061d2fdf442ec:

config :myapp, :elsa,
  ...,
  producer: [
    [topic: "topic_a"],
    [topic: "topic_b"],
    [topic: "topic_c"]
  ]

Starting with this configuration now crashes like so:

** (EXIT) an exception was raised:
        ** (FunctionClauseError) no function clause matching in anonymous fn/1 in Keyword.take/2
            (elixir 1.11.4) lib/keyword.ex:989: anonymous fn([topic: "topic_a"]) in Keyword.take/2

A Keyword.take was added on the breaking commit: https://github.com/bbalser/elsa/commit/4a980b145d4c4ce2c4d6a9a4780061d2fdf442ec#diff-4e38bc59b5e8e2e5ac8b2557a7ebfdb789ac24bca7e516824ce75a32cef38b67R212

I think either reverting the Keyword.take or tolerating lists of keyword configurations should solve this.

c-h- avatar May 04 '21 01:05 c-h-

Thanks for catching this, and sorry for the long turnaround on the response; hopefully should have this patched shortly!

jeffgrunewald avatar Sep 28 '21 01:09 jeffgrunewald

I think this is fixed now.

mhanberg avatar Dec 03 '21 01:12 mhanberg