kafka-proxy | Proxy connections to Kafka cluster | Pub Sub library
kandi X-RAY | kafka-proxy Summary
kandi X-RAY | kafka-proxy Summary
The Kafka Proxy is based on idea of Cloud SQL Proxy. It allows a service to connect to Kafka brokers without having to deal with SASL/PLAIN authentication and SSL certificates. It works by opening tcp sockets on the local machine and proxying connections to the associated Kafka brokers when the sockets are used. The host and port in Metadata and FindCoordinator responses received from the brokers are replaced by local counterparts. For discovered brokers (not configured as the boostrap servers), local listeners are started on random ports. The dynamic local listeners feature can be disabled and an additional list of external server mappings can be provided. The Proxy can terminate TLS traffic and authenticate users using SASL/PLAIN. The credentials verification method is configurable and uses golang plugin system over RPC. The proxies can also authenticate each other using a pluggable method which is transparent to other Kafka servers and clients. Currently the Google ID Token for service accounts is implemented i.e. proxy client requests and sends service account JWT and proxy server receives and validates it against Google JWKS. Kafka API calls can be restricted to prevent some operations e.g. topic deletion or produce requests.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kafka-proxy
kafka-proxy Key Features
kafka-proxy Examples and Code Snippets
Community Discussions
Trending Discussions on kafka-proxy
QUESTION
I am trying to figure out how Lagom can be used to consume data from external systems communicating over Kafka.
I've ran into this section of Lagom documentation, which describes how Lagom service can communicate with another Lagom service by subscribing to its topic.
...ANSWER
Answered 2019-Feb-19 at 09:56An answer was provided by Alan Klikic on Lightbend discussion forums here.
Part 1:
If you are only using external Kafka cluster in your business service then you can implement this using only Lagom Broker API. So you need to:
- create API with service descriptor with only topic definition (this API is not beeing implemented)
- in your business service configure kafka_native depending on your deployment (as i mentioned in previous post)
- in your business service inject service from API created in #1 and subscribe to it using Lagom Broker API subscriber
Offset commiting, in Lagom Broker API subscriber is handled out-of-the-box.
Part 2:
Kafka and AMQP consumer implementations require persistant akka stream. So you need to handle disconnects. These can be done in two ways:
- control peristant akka stream by wraping it in an actor. You initialize you stream Flow on actor preStart and pipe stream complete to the actor that will stop it. If stream completes or fails actor will stop. Then wrap actor in actor backoff with restart strategy, that will restart the actor in case of complete or fail and reinitialize the Flow
- akka streams Delayed restarts with backoff stage
Personnaly I use #1 and did not try #2 yet.
Initializing backoff actor for #1 or Flow for #2 can be done in your Lagom components trait (basically in the same place where you do your subscribe now using Lagom Broker API).
Be sure to set a consumer group when configuring consumer to ensure avoiding duplicate consuming. You can use, like Lagom does, service name from descriptor as consumer group name.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kafka-proxy
Download the latest release Linux curl -Ls https://github.com/grepplabs/kafka-proxy/releases/download/v0.3.0/kafka-proxy-v0.3.0-linux-amd64.tar.gz | tar xz macOS curl -Ls https://github.com/grepplabs/kafka-proxy/releases/download/v0.3.0/kafka-proxy-v0.3.0-darwin-amd64.tar.gz | tar xz
Move the binary in to your PATH. sudo mv ./kafka-proxy /usr/local/bin/kafka-proxy
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page