Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple subscription issue #65

Open
mohsenShakiba opened this issue Jun 19, 2016 · 0 comments
Open

multiple subscription issue #65

mohsenShakiba opened this issue Jun 19, 2016 · 0 comments

Comments

@mohsenShakiba
Copy link

I need to subscribe to a pattern and to a normal channel,
here is my code

client_sub = getRedisSub()
client_sub |> Exredis.Sub.subscribe "status", fn(msg) ->
  case msg do
    {:message, _, groupID, _} -> RedisActions.onSendMessageToMembersOf(groupID)
    _ -> IO.inspect msg
  end
end

client_sub |> Exredis.Sub.psubscribe "message:*", fn(msg) ->
  Message.parse_redis_message(msg)
end

but the problem is only one of them will receive the published events, whichever that comes first.
what am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant