Bruce是 ApacheKafka的生产者守护进程,它简化了客户端发送消息到Kafka,无需关注后端的Kafka集群。Bruce主要处理:
Routingmessagestotheproperbrokers,andspreadingtheloadevenlyacrossmultiplepartitionsforagiventopic
Waitingforacknowledgements,andresendingmessagesasnecessaryduetocommunicationfailuresorKafka-reportederrors
BufferingmessagestohandletransientloadspikesandKafka-relatedproblems
Trackingmessagediscardswhenseriousproblemsoccur;Providingweb-baseddiscardreportingandstatusmonitoringinterfaces
Batchingandcompressingmessagesinaconfigurablemannerforimprovedperformance
BrucerunsoneachindividualhostthatcommunicateswithKafka,receivingmessagesfromlocalclientsoveraUNIXdomaindatagramsocket.ClientswritemessagestoBruce'ssocketinasimplebinaryformat.Onceaclienthaswrittenamessage,nofurtherinteractionwithBruceisrequired.Fromthatpointonward,Brucetakesfullresponsibilityforreliablemessagedelivery.BruceservesasasingleintakepointforaKafkacluster,receivingmessagesfromdiverseclientsregardlessofwhatprogramminglanguageaclientiswrittenin.ClientcodeiscurrentlyavailableinC,C++,Java,Python,andPHP.Codecontributionsforclientsinotherprogramminglanguagesaremuchappreciated.TechnicaldetailsonhowtosendmessagestoBruceareprovided here.BrucerunsonLinux,andhasbeentestedonCentOSversions7and6.5,andUbuntuversions14.04.1LTSand13.10.Brucerequiresatleastversion0.8ofKafka.
评论