[syslog-ng] Module development guide

Vincent Bernat bernat at luffy.cx
Tue Jan 26 07:43:07 CET 2016


 ❦ 22 janvier 2016 12:43 +0100, "Scheidler, Balázs" <balazs.scheidler at balabit.com> :

> well, the afsocket one. that's a completely nonblocking destination
> that implements udp/tcp/unix-stream/unix-dgram/syslog/network sources
> and destinations.
>
> It basically boils down to using a LogWriter class that does the heavy
> lifting at least as long as your transport protocol is simple enough.
> Probably the simplest is to create a LogProto implementation and let
> the afsocket driver do the rest.
>
> Asynchronous sources/destinations operate on a set of worker threads
> (in contrast to a dedicated thread) and are driven by the epoll()
> based event loop.

It's for the librdkafka-based kafka destination. So, the third-party
library is taking care of all the transport stuff. Is the afsocket one
still a good example for async stuff in this case? I didn't have a look
yet.
-- 
Don't compare floating point numbers just for equality.
            - The Elements of Programming Style (Kernighan & Plauger)


More information about the syslog-ng mailing list