Copyright © 2018-2020 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
mqtt_msg() = #{pool => atom(), topic => [binary()], topic_bindings => [proplists:property()], message => mqtt_packet_map:mqtt_message(), publisher_context => term(), subscriber_context => term(), no_local => boolean(), qos => 0 | 1 | 2, retain_as_published => boolean(), retain_handling => integer()}
subscriber() = {pid() | mfa(), OwnerPid::pid(), subscriber_options()}
subscriber_options() = #{subscriber_context => term(), no_local => boolean(), qos => 0 | 1 | 2, retain_as_published => boolean(), retain_handling => integer()}
code_change/3 | |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
info/1 | |
init/1 | |
name/1 | |
publish/3 | |
publish/4 | |
start_link/1 | |
subscribe/4 | |
subscribe/6 | |
terminate/2 | |
unsubscribe/3 | |
unsubscribe_pid/2 |
code_change(Vsn, State, Extra) -> any()
handle_call(Cmd, From, State) -> any()
handle_cast(Cmd, State) -> any()
handle_info(Info, State) -> any()
info(Pool::atom()) -> list()
init(X1::[atom()]) -> {ok, #state{pool = atom(), router = router:router(), monitors = map()}}
name(Pool::atom()) -> atom()
publish(Pool::atom(), Topic::list(), Msg::mqtt_packet_map:mqtt_message()) -> {ok, pid() | undefined} | {error, overload}
publish(Pool::atom(), Topic0::list(), Msg::mqtt_packet_map:mqtt_message(), PublisherContext::term()) -> {ok, pid() | undefined} | {error, overload}
start_link(Pool::atom()) -> {ok, pid()} | {error, term()}
subscribe(Pool::atom(), Topic::list(), MFA::mqtt_sessions:callback(), SubscriberContext::term()) -> ok | {error, invalid_subscriber}
subscribe(Pool, TopicFilter, Subscriber, OwnerPid, Options, SubscriberContext) -> any()
terminate(Reason, State) -> any()
unsubscribe(Pool::atom(), TopicFilter::list(), Pid::pid()) -> ok | {error, notfound}
unsubscribe_pid(Pool::atom(), Pid::pid()) -> ok
Generated by EDoc