Skip to content

Commit

Permalink
Merge pull request #4881 from alorbach/omazureeventhubs
Browse files Browse the repository at this point in the history
omazureeventhubs: Initial implementation of new output module
  • Loading branch information
rgerhards committed Jul 7, 2023
2 parents 43f9ffe + d5ce3da commit d4ac70e
Show file tree
Hide file tree
Showing 11 changed files with 1,829 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ tests/rstb_*
clang_output_*
tools/logctl
tools/rscryutil
/bin/
8 changes: 8 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ if ENABLE_IMKAFKA
SUBDIRS += plugins/imkafka
endif

if ENABLE_OMAZUREEVENTHUBS
SUBDIRS += plugins/omazureeventhubs
endif

if ENABLE_OMPROG
SUBDIRS += plugins/omprog
endif
Expand Down Expand Up @@ -532,6 +536,10 @@ if ENABLE_KAFKA_TESTS
DISTCHECK_CONFIGURE_FLAGS+= --enable-kafka-tests
endif

if ENABLE_OMAZUREEVENTHUBS
DISTCHECK_CONFIGURE_FLAGS+= --enable-omazureeventhubs
endif

if ENABLE_IMJOURNAL
DISTCHECK_CONFIGURE_FLAGS+= --enable-imjournal
endif
Expand Down
69 changes: 67 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2313,6 +2313,17 @@ AC_ARG_ENABLE(imkafka,
[enable_imkafka=no]
)

AC_ARG_ENABLE(omazureeventhubs_tests,
[AS_HELP_STRING([--enable-omazureeventhubs-tests],[Enable Omazureeventhubs tests @<:@default=no@:>@])],
[case "${enableval}" in
yes) enable_omazureeventhubs_tests="yes" ;;
no) enable_omazureeventhubs_tests="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-omazureeventhubs-tests) ;;
esac],
[enable_omazureeventhubs_tests=no]
)
AM_CONDITIONAL(ENABLE_OMAZUREEVENTHUBS_TESTS, test x$enable_omazureeventhubs_tests = xyes)

AC_ARG_ENABLE(kafka_tests,
[AS_HELP_STRING([--enable-kafka-tests],[Enable Kafka tests, needs Java @<:@default=no@:>@])],
[case "${enableval}" in
Expand Down Expand Up @@ -2427,8 +2438,58 @@ fi
AM_CONDITIONAL(ENABLE_OMKAFKA, test x$enable_omkafka = xyes -o x$enable_omkafka = xoptional)
AM_CONDITIONAL(ENABLE_IMKAFKA, test x$enable_imkafka = xyes -o x$enable_imkafka = xoptional)

#MONGODB SUPPORT

# omazureeventhubs support for output module
AC_ARG_ENABLE(omazureeventhubs,
[AS_HELP_STRING([--enable-omazureeventhubs],[Compiles AzureEventHubs output module @<:@default=no@:>@])],
[case "${enableval}" in
yes) enable_omazureeventhubs="yes" ;;
no) enable_omazureeventhubs="no" ;;
optional) enable_omazureeventhubs="optional" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-omazureeventhubs) ;;
esac],
[enable_omazureeventhubs=no]
)

# PROTON PROTOCOL SUPPORT for omazureeventhubs
# uses qpid-proton library
if test "x$enable_omazureeventhubs" = "xyes"; then
PKG_CHECK_MODULES(PROTON, libqpid-proton >= 0.13)
AC_SUBST(PROTON_CFLAGS)
AC_SUBST(PROTON_LIBS)
fi
if test "x$enable_omazureeventhubs" = "xyes"; then
PKG_CHECK_MODULES(PROTON_PROACTOR, libqpid-proton-proactor >= 0.13)
AC_SUBST(PROTON_PROACTOR_CFLAGS)
AC_SUBST(PROTON_PROACTOR_LIBS)
fi
AM_CONDITIONAL(ENABLE_OMAZUREEVENTHUBS, test x$enable_omazureeventhubs = xyes)
# END PROTON

if test "x$enable_omazureeventhubs" = "xyes"; then
if test "x$enable_omazure_tests" = "xyes"; then
AC_MSG_NOTICE([omazureveenthubs: TEST Suite enabled, requires Azure Environment variables!])
fi
else
if test "x$enable_omazure_tests" = "xyes"; then
AC_MSG_WARN([Omazureeventhubs Tests can not be enabled omazureveenthubs support. Disabling enable_omazure_tests...])
enable_omazure_tests="no"
fi
fi

# Static QPID-Proton support?
AC_ARG_ENABLE(qpidproton_static,
[AS_HELP_STRING([--enable-qpidproton_static],[Enable static library linking for qpid-proton (required by omazureeventhubs module). Removes dependency for libqpid-proton*.so. @<:@default=no@:>@])],
[case "${enableval}" in
yes) enable_qpidproton_static="yes" ;;
no) enable_qpidproton_static="no" ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-qpidproton_static) ;;
esac],
[enable_qpidproton_static=no]
)
AM_CONDITIONAL(ENABLE_QPIDPROTON_STATIC, test x$enable_qpidproton_static = xyes)

#MONGODB SUPPORT
AC_ARG_ENABLE(ommongodb,
[AS_HELP_STRING([--enable-ommongodb],[Compiles ommongodb module @<:@default=no@:>@])],
[case "${enableval}" in
Expand Down Expand Up @@ -2818,7 +2879,8 @@ AC_CONFIG_FILES([Makefile \
plugins/mmsnmptrapd/Makefile \
plugins/pmlastmsg/Makefile \
plugins/mmdblookup/Makefile \
contrib/mmdarwin/Makefile \
plugins/omazureeventhubs/Makefile \
contrib/mmdarwin/Makefile \
contrib/omhttp/Makefile \
contrib/fmhash/Makefile \
contrib/fmunflatten/Makefile \
Expand Down Expand Up @@ -2873,6 +2935,7 @@ echo " message counting support enabled: $enable_mmcount"
echo " liblogging-stdlog support enabled: $enable_liblogging_stdlog"
echo " libsystemd enabled: $enable_libsystemd"
echo " kafka static linking enabled: $enable_kafka_static"
echo " qpid proton static linking enabled: $enable_qpidproton_static"
echo " atomic operations enabled: $enable_atomic_operations"
echo " libcap-ng support enabled: $enable_libcapng"

Expand Down Expand Up @@ -2924,6 +2987,7 @@ echo " omamqp1 module will be compiled: $enable_omamqp1"
echo " omtcl module will be compiled: $enable_omtcl"
echo " omkafka module will be compiled: $enable_omkafka"
echo " omhiredis module will be compiled: $enable_omhiredis"
echo " omazureeventhubs module will be compiled: $enable_omazureeventhubs"
echo
echo "---{ parser modules }---"
echo " pmlastmsg module will be compiled: $enable_pmlastmsg"
Expand Down Expand Up @@ -2991,6 +3055,7 @@ echo " ClickHouse Tests: $enable_clickhouse_tests"
echo " PostgreSQL Tests enabled: $enable_pgsql_tests"
echo " Kafka Tests enabled: $enable_kafka_tests"
echo " Redis Tests enabled: $enable_redis_tests"
echo " Omazureeventhubs Tests enabled: $enable_omazureeventhubs_tests"
echo " Imdocker Tests enabled: $enable_imdocker_tests"
echo " gnutls tests enabled: $enable_gnutls_tests"
echo " imfile tests enabled: $enable_imfile_tests"
Expand Down
13 changes: 13 additions & 0 deletions plugins/omazureeventhubs/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
pkglib_LTLIBRARIES = omazureeventhubs.la

omazureeventhubs_la_SOURCES = omazureeventhubs.c
if ENABLE_QPIDPROTON_STATIC
omazureeventhubs_la_LDFLAGS = -module -avoid-version $(PROTON_PROACTOR_LIBS) $(PTHREADS_LIBS) $(OPENSSL_LIBS) -lm
omazureeventhubs_la_LDFLAGS = -module -avoid-version -Wl,-whole-archive -l:libqpid-proton-proactor-static.a -l:libqpid-proton-core-static.a -Wl,--no-whole-archive $(PTHREADS_LIBS) $(OPENSSL_LIBS) ${RT_LIBS} -lsasl2
omazureeventhubs_la_LIBADD =
else
omazureeventhubs_la_LDFLAGS = -module -avoid-version $(PROTON_PROACTOR_LIBS) $(PTHREADS_LIBS) $(OPENSSL_LIBS) -lm
omazureeventhubs_la_LIBADD =
endif
omazureeventhubs_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(CURL_CFLAGS) $(PROTON_PROACTOR_CFLAGS) -Wno-error=switch
EXTRA_DIST =

0 comments on commit d4ac70e

Please sign in to comment.