Kusukela esigabeni esinikeziwe, bhala uhlu lwezixhumanisi eziyinhloko ze-API kuKafka. Zihlukanise ngekhoma.
Context:I-Kafka igcina imilayezo eyisihluthulelo-nenani elivela ezinqubweni eziningi ezibizwa ngokuthi abakhiqizi. Imininingwane ingahlukaniswa ibe "izingxenye" ezihlukene "ezingaphansi kwezihloko" ezihlukene. Ngaphakathi ukwahlukanisa, imilayezo ngokuqinile ihlelwe by offsets zabo (isikhundla umyalezo ngaphakathi ukwahlukanisa), futhi indexed futhi agcinwe ndawonye ne isitembu sesikhathi. Ezinye izinqubo ezibizwa ngokuthi "abathengi" zingafunda imilayezo evela ezingxenyeni. Ukucubungula ukugeleza, iKafka inikeza i-Streams API evumela ukubhala izinhlelo zokusebenza zeJava ezisebenzisa idatha evela kuKafka bese zibhala imiphumela ibuyele kuKafka. I-Apache Kafka futhi isebenza nezinhlelo zokucubungula ukusakazwa kwangaphandle njenge-Apache Apex, i-Apache Beam, i-Apache Flink, i-Apache Spark, i-Apache Storm, ne-Apache NiFi.  I-Kafka isebenza kuqoqo lamaseva owodwa noma amaningi (abizwa ngokuthi ama-broker), futhi izingxenye zazo zonke izihloko zisatshalaliswa kuwo wonke ama-node eqoqo. Ngaphezu kwalokho, izingxenye ziphindaphindeka kubathengisi abaningi. Lolu hlelo lwenza i-Kafka ikwazi ukuhambisa imiyalezo eminingi ngendlela evumela ukwehluleka futhi ivumele ukuthi ithathe indawo yezinhlelo ezijwayelekile zokuthumela imiyalezo njenge-Java Message Service (JMS), i-Advanced Message Queuing Protocol (AMQP), njll. Kusukela kukhishwe i-0.11.0.0, i-Kafka inikeza ukubhala kokuthengiselana, okunikeza ukucubungula okuqondile kokuthumela imiyalezo kusetshenziswa i-Streams API.  I-Kafka isekela izinhlobo ezimbili zezihloko: Ezivamile nezihlanganisiwe. Izihloko ezivamile zingahlelwa ngesikhathi sokugcina noma isikhala esibekiwe. Uma kunamarekhodi amadala kunesikhathi sokugcina esibekiwe noma uma isikhala sidluliwe esigabeni, uKafka uvunyelwe ukususa idatha endala ukuze akhulule isikhala sokugcina. Ngokuzenzakalelayo, izihloko zilungiselelwe isikhathi sokugcina sezinsuku ezingu-7, kodwa kungenzeka futhi ukugcina idatha ngokungapheli. Ezindabeni ezihlanganisiwe, amarekhodi awaphelelwa yisikhathi ngenxa yemingcele yesikhathi noma yendawo. Esikhundleni salokho, uKafka uphatha imiyalezo yakamuva njengokuvuselelwa komyalezo omdala onokhiye ofanayo futhi aqinisekise ukuthi ngeke asuse umyalezo wakamuva ngokhiye ngamunye. Abasebenzisi bangakwazi ukususa imiyalezo ngokuphelele ngokubhala lokho okubizwa ngokuthi umyalezo wetshe lesikhumbuzo onenani elingenalutho lokhiye othize.  Kunezinhlobo ezinhlanu ezinkulu ze-API ku-Kafka:  I-API yomkhiqizi <unk> Ivumela uhlelo lokusebenza ukushicilela ukugeleza kwamarekhodi. I-Consumer API <unk> Ivumela uhlelo lokusebenza ukuthi lubhalisele izihloko futhi lucubungule imifudlana yamarekhodi. I-Connector API <unk> Yenza i-API yomkhiqizi nomthengi engasetshenziswa kabusha engaxhumanisa izihloko nezicelo ezikhona. I-Streams API <unk> Le-API iguqula imifudlana yokufaka ibe yimiphumela bese ikhiqiza umphumela. I-Admin API <unk> Isetshenziselwa ukuphatha izihloko ze-Kafka, ama-broker, nezinye izinto ze-Kafka. Ama-API omthengi nomkhiqizi ahlukanisiwe nokusebenza okuyisisekelo kweKafka ngokusebenzisa inqubo eyisisekelo yokuthumela imiyalezo. Lokhu kuvumela ukubhala izendlalelo ze-API ezihambisanayo kunoma yiluphi ulimi lokuhlela olusebenza kahle njengama-API we-Java ahlanganiswe neKafka. Iphrojekthi ye-Apache Kafka igcina uhlu lwama-API wesithathu anjalo.
I-API yomkhiqizi, i-API yomthengi, i-API yokuxhuma, i-API yokusakaza, i-API yokuphatha