Kafka is a high-throughput distributed publish-subscribe messaging system that handles all the action flow data in a consumer-scale website. This kind of action (web browsing, search and other user actions) is a key factor in many social functions on modern networks. This data is usually resolved by processing logs and log aggregations due to throughput requirements. This is a viable solution for the same log data and offline analysis system as Hadoop, but requires real-time processing constraints. The purpose of Kafka is to unify online and offline message processing through Hadoop's parallel loading mechanism, and also to provide real-time consumption through the cluster machine.
The following explains the Kafka C + + client compilation link process.
1. The following URLs can be found in the various languages of the client address: https://cwiki.apache.org/confluence/display/KAFKA/Clients#Clients-C/C++
You can find the C + + client address: Https://github.com/edenhill/librdkafka
2. After downloading the extract, execute it in the directory:./configure
3. The error is as follows:
############################################################## Configure failed # # # ############################################################## Accumulated failures: ####### ####################################################### __sync_32 (have_atomics_32) module:atomics action:disable Reason:compile Check FAILED:CC:CCFLAGS:GCC-g-o2-fpic-wall-werror _MKLTMP30679.C-o _MKLTMP30679.C.O:/tmp/ccuxfue4.o:in function ' Foo':/HOME/XUMJ/SUPPORT/KAFKA/LIBRDKAFKA-MASTER/_MKLTMP30679.C:4: Undefined reference to ' __sync_add_and_fetch_4'Collect2:ld return1Source: #include<inttypes.h>int32_t foo (int32_t i) {return__sync_add_and_fetch (&i,1);} __sync_64 (have_atomics_64) module:atomics action:disable reason:compile Check FAILED:CC:CCFLAGS:GCC-g-o2-fpic-wall-werror _MKLTMP30720.C-o _MKLTMP30720.C.O:/tmp/ccynhxii.o:in function ' Foo':/HOME/XUMJ/SUPPORT/KAFKA/LIBRDKAFKA-MASTER/_MKLTMP30720.C:4: Undefined reference to ' __sync_add_and_fetch_8'Collect2:ld return1Source: #include<inttypes.h>int64_t foo (int64_t i) {return__sync_add_and_fetch (&i,1);}
Please use the following command to execute:
Cflags= "-o2-march=i686"./configure--cc=gcc--cxx=g++--arch=i686--mbits=32--prefix=/home/test/support/kafka/ Install
4. Execute make
5. Execute make install.
Kafka C + + client compilation