kafka | Apache Kafka on Apache Mesos | Pub Sub library
kandi X-RAY | kafka Summary
kandi X-RAY | kafka Summary
Kafka Mesos Framework
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
kafka Key Features
kafka Examples and Code Snippets
Community Discussions
Trending Discussions on kafka
QUESTION
e: this has been fixed through Spring Boot 2.6.5 (see https://github.com/spring-projects/spring-boot/issues/30243)
Since upgrading to Spring Boot 2.6.X (in my case: 2.6.1), I have multiple projects that now have failing unit-tests on Windows that cannot start EmbeddedKafka
, that do run with Linux
There is multiple errors, but this is the first one thrown
...ANSWER
Answered 2021-Dec-09 at 15:51Known bug on the Apache Kafka side. Nothing to do from Spring perspective. See more info here: https://github.com/spring-projects/spring-kafka/discussions/2027. And here: https://issues.apache.org/jira/browse/KAFKA-13391
You need to wait until Apache Kafka 3.0.1
or don't use embedded Kafka and just rely on the Testcontainers, for example, or fully external Apache Kafka broker.
QUESTION
I am new to kafka and zookepper, and I am trying to create a topic, but I am getting this error -
...ANSWER
Answered 2021-Sep-30 at 14:52Read the official Kafka documentation for the version you downloaded, and not some other blog/article that you might have copied the command from
zookeeper
is almost never used for CLI commands in current versions
If you run bin\kafka-topics
on its own with --help
or no options, then it'll print the help messaging that shows all available arguments.
QUESTION
My buckets are:
- MyDataBucket: application saves its data on this bucket.
- MyEventingBucket: A couchbase eventing function extracts the 'currentState' field from MyDataBucket and saves it in this bucket.
Also, I have a kafka couchbase connector that pushs data from MyEventingBucket to kafka topic.
When we had a single data center, there wasn't any problem. Now, we have three data centers. We replicate our data with XDCR between data centers and we work as active-active. So, write requests can be from any data center.
When data is replicated on other data centers, the eventing service works on all data centers, and the same data is pushed three-time (because we have three data centers) on Kafka with Kafka connector.
How can we avoid pushing duplicate data o Kafka?
Ps: Of course, we can run an eventing service or Kafka connector in only one data center. So, we can publish data on Kafka just once. But this is not a good solution. Because we will be affected when a problem occurs in this data center. This was the main reason of using multi data center.
...ANSWER
Answered 2022-Feb-14 at 19:12Obviously in a perfect world XDCR would just work with Eventing on the replicated bucket.
I put together an Eventing based work around to overcome issues in an active / active XDCR configuration - it is a bit complex so I thought working code would be best. This is one way to perform the solution that Matthew Groves alluded to.
Documents are tagged and you have a shared via XDCR "cluster_state" document (see comments in the code) to coordinated which cluster is "primary" as you only want one cluster to fire the Eventing function.
I will give the code for an Eventing function "xcdr_supression_700" for version 7.0.0 with a minor change it will also work for 6.6.5.
Note, newer Couchbase releases have more functionality WRT Eventing and allow the Eventing function to be simplified for example:
- Advanced Bucket Accessors in 6.6+ specifically couchbase.replace() can use CAS and prevent potential races (note Eventing does not allow locking).
- Timers have been improved and can be overwritten in 6.6+ thus simplifying the logic needed to determine if a timer is an orphan.
- Constant Alias bindings in 7.X allow the JavaScript Eventing code identical between clusters changing just a setting for each cluster.
Setting up XDCR and Eventing
The following code will successfully suppress all extra Eventing mutations on a bucket called "common" or in 7.0.X a keyspace of "common._default._default" with an active/active XDCR replication.
The example is for two (2) clusters but may be extended. This code is 7.0 specific (I can supply a 6.5.1 variant if needed - please DM me)
PS : The only thing it does is log a message (in the cluster that is processing the function). You can just set up two one node clusters, I named my clusters "couch01" and "couch03". Pretty easy to setup and test to ensure that mutations in your bucket are only processed once across two clusters with active/active XDCR
The Eventing Function is generic WRT the JavaScript BUT it does require a different constant alias on each cluster, see the comment just under the OnUpdate(doc,meta) entry point.
QUESTION
I'm running Kafka schema registry version 5.5.2, and trying to register a schema that contains a reference to another schema. I managed to do this when the referenced schema was in the same package with the referencing schema, with this curl
command:
ANSWER
Answered 2022-Feb-02 at 10:55First you should registrer your other proto to the schema registry.
Create a json (named other-proto.json) file with following syntax:
QUESTION
I was trying to build a new image for a small dotnet core 3.1 console application. I got an error:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to copy: httpReadSeeker: failed open: failed to do request: Get https://westeurope.data.mcr.microsoft.com/42012bb2682a4d76ba7fa17a9d9a9162-qb2vm9uiex//docker/registry/v2/blobs/sha256/87/87413803399bebbe093cfb4ef6c89d426c13a62811d7501d462f2f0e018321bb/data?P1=1627480321&P2=1&P3=1&P4=uDGSoX8YSljKnDQVR6fqniuqK8fjkRvyngwKxM7ljlM%3D&se=2021-07-28T13%3A52%3A01Z&sig=wJVu%2BBQo2sldEPr5ea6KHdflARqlzPZ9Ap7uBKcEYYw%3D&sp=r&spr=https&sr=b&sv=2016-05-31®id=42012bb2682a4d76ba7fa17a9d9a9162: x509: certificate has expired or is not yet valid
I have checked an old dotnet program which my dockerfile was working perfectly. I got the same error. Then, I jumped to Docker Hub and checked the MS Images to see that all MS images have been updated for an hour. And then they have been updated once again, 10 Minutes ago xD. However, I still cannot pull the base images of mcr.microsoft.com/dotnet/runtime:3.1 and mcr.microsoft.com/dotnet/sdk:3.1. My whole Dockerfile is:
...ANSWER
Answered 2022-Jan-26 at 09:25so as @Chris Culter mentioned in a comment above, I just restarted my machine and it works again.
It is kind of strange because I already updated my Docker Desktop, restarted, and cleaned/ purged the docker data. None of those helped, just after restarting my windows it works again!
QUESTION
We have a bunch of microservices based on Spring Boot 2.5.4 also including spring-kafka:2.7.6
and spring-boot-actuator:2.5.4
. All the services use Tomcat as servlet container and graceful shutdown enabled. These microservices are containerized using docker.
Due to a misconfiguration, yesterday we faced a problem on one of these containers because it took a port already bound from another one.
Log states:
ANSWER
Answered 2021-Dec-17 at 08:38Since you have everything containerized, it's way simpler.
Just set up a small healthcheck endpoint with Spring Web which serves to see if the server is still running, something like:
QUESTION
I tried to run Kafka on CMD in Windows and it's very unstable , constantly giving errors. Then I came across this post, which suggests installing Ubuntu and run Kafka from there.
I have installed Ubuntu successfully. Given that I have already defined JAVA_HOME=C:\Program Files\Java\jdk1.8.0_231
as one of the environmental variables and CMD recognizes this variable but Ubuntu does not, I am wondering how to make Ubuntu recognize this because at the moment, when i typed java -version
, Ubuntu returns command not found
.
Update: Please note that I have to have Ubuntu's JAVA_HOME
pointing to the evironmental variable JAVA_HOME
defined in my Window system. Because my Java program in eclipse would need to talk to Kafka using the same JVM.
I have added the two lines below in my /etc/profile
file. echo $JAVA_HOME
returns the correct path. However, java -version
returns a different version of Java installed on Ubuntu, not the one defined in the /etc/profile
ANSWER
Answered 2021-Dec-15 at 08:16When the user logs in, the environment will be loaded from the /etc/profile and $HOME/.bashrc files. There are many ways to solve this problem. You can execute ex manually
QUESTION
I have the following code
...ANSWER
Answered 2021-Dec-03 at 15:55The seekToEnd
method requires the information on the actual partition (in Kafka terms TopicPartition
) on which you plan to make your consumer read from the end.
I am not familiar with the Kotlin API, but checking the JavaDocs on the KafkaConsumer's method seekToEnd you will see, that it asks for a collection of TopicPartitions.
As you are currently using emptyList()
, it will have no impact at all, just like you observed.
QUESTION
We've been moving our applications from CircleCI to GitHub Actions in our company and we got stuck with a strange situation.
There has been no change to the project's code, but our kafka integration tests started to fail in GH Actions machines. Everything works fine in CircleCI and locally (MacOS and Fedora linux machines).
Both CircleCI and GH Actions machines are running Ubuntu (tested versions were 18.04 and 20.04). MacOS was not tested in GH Actions as it doesn't have Docker in it.
Here are the docker-compose
and workflow
files used by the build and integration tests:
- docker-compose.yml
ANSWER
Answered 2021-Nov-03 at 19:11We identified some test sequence dependency between the Kafka tests.
We updated our Gradle version to 7.3-rc-3
which has a more deterministic approach to test scanning. This update "solved" our problem while we prepare to fix the tests' dependencies.
QUESTION
I want to read json messages from Kafka and put them into another structure of SpecificRecordBase class (avro). The part of the json has dynamic structure for example
...ANSWER
Answered 2021-Nov-02 at 06:27One of possible solutions for the proposed data structure that passes decoding tests from the question:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kafka
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