Hi, playing with tinymq here. I have a very simple gen_server which subscribes on initialisation as follows:
init([]) ->
tinymq:subscribe(?MODULE, now, self()),
{ok, #state{}}.
modified handle_info to dump any messages received (I'm assuming they appear at the handle_info level):
handle_info(Info, State) ->
io:format("handle_info: ~w~n", [Info]),
{noreply, State}.
then finally added a top- level function to push messages onto the queue:
send(Msg) ->
tinymq:push(?MODULE, {msg, Msg}).
Now this works fine for the first message I send; message dumped to console by handle_info; but after that no other pushed messages are dumped.
Have I misunderstood how the tinymq subscribe API works ? Do I have to flush queues somewhere ?
TIA