ClassCastException during kafka headers conversion

I am trying to cast session.get() data to kafka Headers object. I got below exception. what could be reason.

j.l.ClassCastException: class io.gatling.javaapi.core.Session cannot be cast to class org.apache.kafka.common.header.Headers (io.gatling.javaapi.core.Session and org.apache.kafka.common.header.Headers are in unnamed module of loader ‘app’)

code :
Headers headers = session.get(“headers”);

No idea what you’re doing.

Gatling doesn’t have an official Kafka support. There’s a third party plugin, see Gatling - Third Party Plugins

But it’s not supported here, you’ll have to reach out directly this other project.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.