Coder Social home page Coder Social logo

voiceip / mod_event_kafka Goto Github PK

View Code? Open in Web Editor NEW
37.0 7.0 33.0 489 KB

Freeswitch Kafka Plugin

License: GNU General Public License v3.0

Makefile 3.88% C++ 85.44% Shell 3.46% Dockerfile 7.22%
freeswitch-kafka-plugin freeswitch kafka freeswitch-plugin freeswitch-event

mod_event_kafka's Introduction

mod_event_kafka

Freeswitch Kafka Plugin

Build Status

Install this plugin to publish all of the freeswitch generated events to Kafka reliably from the freeswitch server. To enable just configure the event_kafka.conf.xml

<configuration name="event_kafka.conf" description="Kafka Event Configuration">
	<settings>
		<param name="bootstrap-servers" value="localhost:9092"/>
		<param name="topic" value="kafa-topic-name" /> 
		<param name="username" value="" />
		<param name="password" value="" />
		<param name="buffer-size" value="256" /> 
		<param name="compression" value="snappy"/>
		<param name="event-filter" value=""/> 
	</settings>
 </configuration>

and enable autoloading of the module by adding the following entry in modules.conf.xml

 <load module="mod_event_kafka"/>

Building

IDE Based Build

We use vscode + docker, to enable easy building on any platform with the use of remote-container feature of Visual Studio Code. If you are new to this, follow the getting started guide

Open the project in Visual Studio Code and just Run Task Release.

Manually Building

Install Dependencies

sudo apt-get install libfreeswitch-dev
sudo apt-get install build-essential pkg-config 
sudo apt-get install librdkafka-dev libz-dev libssl-dev

Build

make
make install

mod_event_kafka's People

Contributors

kingster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mod_event_kafka's Issues

Error when freeswitch load mod_event_kafka

Hi , Currently I am trying to use this module to integrate our freeswitch using kafka.
i already compile and get a mod_event_kafka.so file.

When i try to load this module, i got this error.

Screen Shot 2021-11-25 at 09 36 30

Is there anything i had wrong on implementing this module?

Thank you, any suggestions or input will be very helpful

install Doc

hello
can you complete your readme, i can not install it.
can i use kafka in freeswitch?

Compile error

# make
mod_event_kafka.cpp: In static member function ‘static void mod_event_kafka::KafkaModule::event_handler(switch_event_t*)’:
mod_event_kafka.cpp:247:37: error: catching polymorphic type ‘class std::exception’ by value [-Werror=catch-value=]
  247 |             } catch (std::exception ex) {
      |                                     ^~
cc1plus: all warnings being treated as errors
make: *** [Makefile:18: mod_event_kafka.o] Error 1
# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 10.2.1-6' --with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-10 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-Km9U7s/gcc-10-10.2.1/debian/tmp-gcn/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20210110 (Debian 10.2.1-6)

detecting connection failures in producer

Description

Hi,
mod_event_kafka is not able to detect connection failures while setting up a producer. I only see errors when I reload the module.

How to reproduce

Run simply producer passing an incorrect broker address.
No error is reported while creating the rdkafka object or topic.

librdkafka version (release number or git tag): v2.1.1
Operating system: ubuntu 16.04
Freeswitch: 1.6

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.