bjpublic / apache-kafka-with-java Goto Github PK
View Code? Open in Web Editor NEW아파치 카프카 애플리케이션 프로그래밍 with 자바
아파치 카프카 애플리케이션 프로그래밍 with 자바
마스터에 올려주신 소스코드 가 책 내용 중 예제 코드 kafka-consumer-rebalance-listener (109페이지) 랑 조금 다른거 같은데 올려둔 소스코드로 공부하면 될까요?
저자님 새해복 많이 받으세요. 🙇🏻♂️
intelliJ 에서 simple-kafka-producer 파일을 만들고 내용을 넣은 후, 로컬에서 토픽을 생성하였는데 'Broker may not be available.' 에러가 나서
책 내 bulid.gradle 은 다음과 같습니다.
jar {
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
}
그런데 jar 명령이 안되더라고요. 아마 deprecated인듯...?
반면, 다음과 같이 했더니 됩니다.
jar {
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
from {
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
109-110 페이지, 챕터 3, 3.4.2 컨슈머 API, "리밸런스 리스너를 가진 컨슈머", 예제 코드 | kafka-consumer-rebalance-listener 에 대한 질문입니다.
4번 태그가 달린 코드 부분, consumer.commitSync(currentOffsets)
, 이 어떻게 실행 가능한가요?
consumer
를 RebalanceListener
에서 참조 할 수 없는데요.
110 페이지 4번 설명을 보면 꼭 있어야 할 거 같아서요.
#5 에서도 비슷한 맥락에 질문한 것 같지만, 단순히 자바 클래스로 추출한 것 외에 이슈가 있는거 같네요.
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.