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?
I need to subscribe to a pattern and to a normal channel,
here is my code
but the problem is only one of them will receive the published events, whichever that comes first.
what am I doing wrong?