otobus / event_bus

:surfer: Traceable, extendable and minimalist **event bus** implementation for Elixir with built-in **event store** and **event watcher** based on ETS.

Home Page:https://hexdocs.pm/event_bus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken Contract

jodyalbritton opened this issue · comments

The call:
EventBus.subscribe(
  {Core.Topics.Handler,
   [
     :topic1,
     :topic2,
     :topic3,
     :topic4,
     ...
   ]}
)

breaks the contract
(listener_with_topic_patterns()) :: :ok

Getting dialyzer errrors when I try to subsribe to some topics. Any ideas?

Hey @jodyalbritton

It seems it is not an issue. Feel free to ask questions on stackoverflow with the #elixir-eventbus tag. And then ping me on twitter @mustafaturan handle.

Topic patterns can only be string representation of regex patterns, you can use like below:

EventBus.subscribe(
  {Core.Topics.Handler,
   [
     "^topic1$",
     "^topic2$",
     ...
   ]}
)

For more details please refer to topic_pattern, topic_pattern_list, listener_with_topic_patterns type spec documentations