Comments (10)
@saad1200
I suppose this can be fixed by trying to fetch the schema first before posting one. We can also use something like srclient and have it handle everything, but it's an extra dependency for just two HTTP requests.
Update:
Upon further investigation, I found out that it uses the internal HTTP client of Go, goavro v2, and jsonschema v5 as dependencies, so it's okay for our use-case. I'll try to see how I can integrate it and make a PR when ready.
from xk6-kafka.
@mostafa sorry for the delay. I will block some time next weekend to test the changes.
from xk6-kafka.
@kusumkappdirect
If you are using latest release and still having this issue all you need to do is to setup wiremock on the dev server or locally, then in the k6 setup method get the schema from the schema registry and stub the methods to return that schema using wiremock. Pass wiremock address instead of the schema registry to the k6 extension produce method.
I will share my code with you soon
from xk6-kafka.
Any update on this?
from xk6-kafka.
Can any of you provide an example script (and/or configuration) you use, so I can test it? Or at least explain more details.
from xk6-kafka.
@mostafa Any produce code example from the repo can be used to reproduce this. It has been few months now, but I think it is an issue with goavro lib.
we noticed that xk6-kafka is posting a new schema when called with produceWithConfiguration. Looks like it’s because they’re stripping out some of the java specific types and before posting the schema to the registry (which I guess they need to do, to get an ID).
Line 59 in 57dfc78
If you look at line 54 and 56, goavro’s codec is turning the schema into and object, then making it into a string again on line 56.
from xk6-kafka.
@ssam5532 our work around is to setup wiremock and use it as schema registry proxy. It is another dependency and far from ideal solution but allowed us to continue using K6.
from xk6-kafka.
@saad1200 @ssam5532 I'd be happy to have your feedback on #52.
from xk6-kafka.
@saad1200 @ssam5532
The PR (#52) is merged now, and you can test it to see if it fixes the issue or not. I haven't released a version yet, so you need to build the latest main
according to xk6 build instructions to test it. Let me know if you face any issues along the way!
Also, based on my tests, the schema doesn't get updated.
from xk6-kafka.
@saad1200 , can you please help me here. , my schema also get updated with each sent message on topic , how you retrieve the schema first and then send same ?
from xk6-kafka.
Related Issues (20)
- Webpack bundler xk6-kafka HOT 1
- Writer is not sending to the indicated partition HOT 3
- Producing msgpack messages with xk6-kafka HOT 2
- Autocomplete not working in Vscode HOT 2
- Kafka connection failure in K6 tests HOT 8
- Kafka Admin Client Support for xk6-kafka HOT 1
- is there a way to control the messages per second generation? HOT 2
- Purpose of xk6-kafka HOT 4
- Using pfx certs instead of jks in xk6-kafka HOT 4
- Add millis to consumed messages HOT 4
- Reader reads empty events HOT 3
- SASL_SSL and oauth authentication HOT 2
- Failed to create schema.
- Error writing messages: broker appears to be expecting TLS HOT 4
- Error serializing value data when using type array using Avro schema HOT 15
- How to set reader commit interval ? HOT 3
- How to skip control batch messages? HOT 1
- Multiple Kafka producers generated for each thread in high-concurrency test HOT 3
- Be able to update offset of kafka reader HOT 7
- Field with the name of the request in k6 stats HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xk6-kafka.