pubsub_adapter
This commit is contained in:
parent
8b6cc4d5f8
commit
b3a48b937f
|
@ -134,7 +134,7 @@ subscribers(Topic) ->
|
|||
subscriptions(Subscriber) ->
|
||||
with_pubsub(fun(PubSub) -> PubSub:subscriptions(Subscriber) end).
|
||||
|
||||
with_pubsub(Fun) -> Fun(conf(pubsub_adapter)).
|
||||
with_pubsub(Fun) -> {ok, PubSub} = conf(pubsub_adapter), Fun(PubSub).
|
||||
|
||||
dump() -> with_pubsub(fun(PubSub) -> lists:append(PubSub:dump(), zenmq_router:dump()) end).
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pubsub_pool() ->
|
|||
hd([Pid || {pubsub_pool, Pid, _, _} <- supervisor:which_children(?MODULE)]).
|
||||
|
||||
init([Env]) ->
|
||||
PubSub = emqttd:conf(pubsub_adapter),
|
||||
{ok, PubSub} = emqttd:conf(pubsub_adapter),
|
||||
PubSubMFA = {PubSub, start_link, [Env]},
|
||||
PoolArgs = [pubsub, hash, pool_size(Env), PubSubMFA],
|
||||
PubSubPoolSup = emqttd_pool_sup:spec(pubsub_pool, PoolArgs),
|
||||
|
|
Loading…
Reference in New Issue