Skip to content

Instantly share code, notes, and snippets.

@dergraf
Last active October 21, 2015 15:44
Show Gist options
  • Save dergraf/56c049099258402835cf to your computer and use it in GitHub Desktop.
Save dergraf/56c049099258402835cf to your computer and use it in GitHub Desktop.
A simple VerneMQ auth_on_publish hook to disable retaining messages.
-module(convert_retain_plugin).
-behaviour(auth_on_publish_hook).
-export([auth_on_publish/6]).
auth_on_publish(_UserName, _SubscriberId, _QoS, _Topic, _Payload, _IsRetain) ->
{ok, [{retain, false}]}.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment