cloudevents / cloudevents/sdk-java
can't setup `cloudevents.serializer.event_format` in quarkus
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 446
- Forks
- 172
- PR merge metrics
- No merged PRs in 30d
Description
Hello everyone, I want to express my appreciation for the fantastic work you're doing!
I've noticed that Quarkus reactive Kafka replaces all underscores (_) with periods (`.``). Here's a code snippet from quarkus code to illustrate this:
private static void extractConfigKey(Config config, JsonObject json, String originalKey, String prefixToStrip) {
// Transform keys that may come from environment variables.
// As Kafka properties use ".", transform "_" into "."
String key = originalKey;
if (key.contains("_") || allCaps(key)) {
key = originalKey.toLowerCase().replace("_", ".");
}
// ...
}
This transformation is causing an issue for me when trying to pass event_format in the application.properties file:
/**
* The configuration key for the {@link EventFormat} to use when serializing the event in structured mode.
*/
public final static String EVENT_FORMAT_CONFIG = "cloudevents.serializer.event_format";
Is there a way to also support event.format, or do you have any suggestions for a workaround? Your insights would be greatly appreciated!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the extractConfigKey method and the EVENT_FORMAT_CONFIG constant shown in the issue, then trace how reactive Kafka maps configuration keys. Determine whether event_format can be configured without being transformed incorrectly, or whether a documented workaround is needed; done means the setting works reliably in application.properties.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kafka
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100