Spring CloudEventMessageConverter content-type header name
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
Direzione di ricerca
Individua il codice di Spring CloudEventMessageConverter in sdk-spring e verifica come legge gli header content-type. Verifica l’interazione tra serializzatore e deserializzatore descritta nell’issue, quindi mantieni i fallback esistenti supportando al contempo il nome dell’header della specifica CloudEvents; il lavoro è completato quando i messaggi strutturati da sdk-kafka vengono deserializzati tramite sdk-spring.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Spring CloudEventMessageConverter content-type header name uses the Spring Messaging contentType header name which differs fom the cloud events spec content-type which is used by Kafka serializer for instance.
This leads to a message from a project using structured mode and kafka serializer (sdk-kafka) to not be deserialized by another project using (sdk-spring).
The current code is as follows on sdk-spring:
if (message.containsKey(MessageHeaders.CONTENT_TYPE)) {
return String.valueOf(message.get(MessageHeaders.CONTENT_TYPE));
}
if (message.containsKey(CloudEventsHeaders.CONTENT_TYPE)) {
return String.valueOf(message.get(CloudEventsHeaders.CONTENT_TYPE));
}
Unfortunately the CloudEventsHeaders.CONTENT_TYPE is CE_PREFIX + "datacontenttype" which is not exactly the same property we are looking here.
I would be happy to create a merge request where a another fallback is introduced to have the spec header name (content-type) which would enable the sdk-spring to deserialize messages.
This would add the support while still keeping it compatible with different versions and services.
Ideally, also the spring-sdk serializer should be checked and changed, but i would rather have this small mr fixed and dive on the serializer in a different issue.
- Lingua principale
- Java
- Stelle
- 446
- Fork
- 172
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudevents/sdk-java
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudevents/sdk-java#731 · 1 reazione ·
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
cloudevents/sdk-java#697 · 3 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudevents/sdk-java#689 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
cloudevents/sdk-java#660 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
cloudevents/sdk-java#748 ·
Tutte le issue di cloudevents/sdk-java
Issue simili
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/rocketmq-dashboard#5064 ·