kitura / swiftkafka Goto Github PK
View Code? Open in Web Editor NEWSwift SDK for Apache Kafka
Swift SDK for Apache Kafka
I have a macOS xcode project and I would like to include IBM Kafka in to my project as a framework and use it. How can I achieve this?
Otherwise, everything looks okay so far.
Hi, I've been trying to use SwiftKafka for a project of mine, but run into an issue when sending messages of around 1.5KB. Instead of the JSON I try to send, it sends some malformed data like this:
2t_id":"16315612"??????
followed by the rest of the JSON in the correct format. Because of this the JSON becomes invalid and unusable.
I've tried multiple config options to increase buffer sizes to allow for bigger messages, but so far nothing has seemed to work. The options I've tried is setting
config.messageMaxBytes = 1000000000
config.socketAendBufferBytes = 1000000000
If I do this however, the message is still malformed and I get the following error in my console:
Failed to set socket send buffer size to 10000000: No buffer space available
Any and all help is much appreciated!
Attempting to run SwiftKafkaTests
on macOS target is resulting in a build error:
ld: warning: Could not find or use auto-linked library 'rdkafka'
...(all the librdkafka C API calls listed here)...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What's interesting is that it seems Xcode's package loading is failing to find rdkafka
even before I attempt to compile showing this warning message:
You may be able to install rdkafka using your system package manager: brew install librdkafka
This is despite the fact that I'm absolutely positive librdkafka
is installed.
rami@machine: ~ % brew info librdkafka
librdkafka: stable 1.5.2 (bottled), HEAD
Apache Kafka C/C++ library
https://github.com/edenhill/librdkafka
/usr/local/Cellar/librdkafka/1.5.2 (36 files, 4MB) *
Poured from bottle on 2020-11-24 at 21:53:28
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/librdkafka.rb
License: BSD-2-Clause
==> Dependencies
Build: pkg-config ✔, [email protected] ✔
Required: lz4 ✔, lzlib ✔, [email protected] ✔, zstd ✔
==> Options
--HEAD
Install HEAD version
==> Analytics
install: 9,191 (30 days), 19,972 (90 days), 71,599 (365 days)
install-on-request: 5,667 (30 days), 11,336 (90 days), 35,858 (365 days)
build-error: 0 (30 days)
macOS Big Sur 11.0.1 (20B29)
Xcode 12.2 (12B45b) + Command Line Tools 12B45b
Swift version 5.3.1
clang version 12.0.0
Homebrew 2.5.11
Homebrew/homebrew-core (git revision 699c9; last commit 2020-11-25)
Homebrew/homebrew-cask (git revision 18071; last commit 2020-11-25)
librdkafka stable 1.5.2
I am developing a watchOS app, that uses data coming from a Kafkastream and I want to use this library for this purpose, but it keeps ignoring my local "librdkafka" library.
Detailed error description:
What I did:
I have added the following config property in my Swift file.
config["bootstrap.servers"] = "localhost:9092"
I tested the property using breakpoint, and it is successfully reflected.
(lldb) po config["bootstrap.servers"]
▿ Optional<String>
- some : "localhost:9092"
However, I still get the following warning and producer messages do not pass through.
%5|1667541464.556|CONFWARN|rdkafka#producer-1| [thrd:app]: No `bootstrap.servers` configured: client will not be able to connect to Kafka cluster
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.