
\begin{DoxyItemize}
\item infos = Information about the zeromqsend plugin is in keys below
\item infos/author = Thomas Wahringer \href{mailto:waht@libelektra.org}{\tt waht@libelektra.\+org}
\item infos/licence = B\+SD
\item infos/provides = notification
\item infos/needs =
\item infos/recommends =
\item infos/placements = postgetstorage postcommit
\item infos/status = maintained unittest libc global experimental
\item infos/description = Sends notifications over Zero\+Mq publish sockets when a key is changed
\end{DoxyItemize}

This plugin is a notification plugin, which sends notifications using Zero\+Mq publish ({\ttfamily Z\+M\+Q\+\_\+\+P\+UB}) sockets when the key database (K\+DB) has been modified. It is compatible with the sending zeromqrecv plugin.


\begin{DoxyItemize}
\item {\ttfamily libzmq3-\/dev} (Zero\+MQ C bindings $>$ 3.\+2)
\end{DoxyItemize}

The recommended way is to globally mount the plugin together with the zeromqrecv plugin\+:

\begin{quote}
kdb global-\/mount zeromqsend zeromqrecv \end{quote}


This plugin is designed to be used as a transport plugin for Elektra\textquotesingle{}s notification feature. Since Zero\+Mq creates threads for asynchronous I/O this plugin always operates asynchronously.

Since Zero\+MQ sockets only provide a 1\+:n mapping (i.\+e. one publisher with many subscribers or one subscriber and many publishers) the {\ttfamily zeromqsend} and {\ttfamily zeromqrecv} plugins require a X\+P\+U\+B/\+X\+S\+UB endpoint. The kdb tool \href{https://www.libelektra.org/tools/hub-zeromq}{\tt \char`\"{}hub-\/zeromq\char`\"{}} provides these endpoints.\hypertarget{autotoc_md909_autotoc_md912}{}\section{Transport Plugin}\label{autotoc_md909_autotoc_md912}
Mount this plugin globally with default settings to use it as {\itshape sending} transport plugin for Elektra\textquotesingle{}s notification feature\+:

\begin{quote}
kdb global-\/mount zeromqsend \end{quote}
\hypertarget{autotoc_md909_autotoc_md913}{}\section{Configuration}\label{autotoc_md909_autotoc_md913}
This plugin supports the following configuration options when mounting\+:


\begin{DoxyItemize}
\item {\bfseries endpoint}\+: Zero\+MQ X\+S\+UB or S\+UB socket to connect to. The \href{http://api.zeromq.org/4-2:zmq-ipc}{\tt {\ttfamily ipc}} and \href{http://api.zeromq.org/4-2:zmq-tcp}{\tt {\ttfamily tcp}} Zero\+MQ transports are recommended. The default value is \char`\"{}tcp\+://localhost\+:6000\char`\"{}.
\item {\bfseries connect\+Timeout}\+: Timeout for establishing connections in milliseconds. The default value is \char`\"{}1000\char`\"{}.
\item {\bfseries subscribe\+Timeout}\+: Timeout for waiting for subscribers in milliseconds. The default value is \char`\"{}200\char`\"{}.
\end{DoxyItemize}\hypertarget{autotoc_md909_autotoc_md914}{}\section{Notification Format}\label{autotoc_md909_autotoc_md914}
The Zero\+MQ transport plugins use the publish/subscribe sockets ({\ttfamily Z\+M\+Q\+\_\+\+P\+UB} and {\ttfamily Z\+M\+Q\+\_\+\+S\+UB}) for notification transport.

Each notification is a multipart message. The first part contains the type of change, the second part contains the name of the changed key.

Possible only current change is {\ttfamily Commit}. 