elixir phoenix pubsub wildcard topic

Viewed 357

when using phoenix pubs directly is there a way for subscribing to a topic with partial match, e.g. something like "user:*"?

just for illustration sake, the following code:

Phoenix.PubSub.subscribe("my_pubsub", "user:*")

should match all the following events:

Phoenix.PubSub.broadcast("my_pubsub", "user:123", "banana")
Phoenix.PubSub.broadcast("my_pubsub", "user:911", "apple")
Phoenix.PubSub.broadcast("my_pubsub", "user:", "orange")
1 Answers
Related