Conversation
There was a problem hiding this comment.
should be moved to (new) directory
test/functionalTest/cases/4726_kafka_notif_override_fiware_service_and_servicepath/
or some similar name
| @@ -91,6 +91,11 @@ std::string KafkaInfo::toJson() | |||
| jh.addRaw("ngsi", this->ngsi.toJson(NGSI_V2_NORMALIZED, true)); | |||
There was a problem hiding this comment.
A new entry to CHANGES_NEXT_RELEASE file about the changes in this PR should be added.
| "url": "kafka://localhost:9092,localhost:9094", | ||
| "topic": "sub1", | ||
| "payload": "{ %22A%22: %22${A}%22 }", | ||
| "headers": {"fiware-service": "cucu"} |
There was a problem hiding this comment.
Test only include fiware-service and fiware-servicepath cases.
It would be great to include also a .test including a not-special header (i.e. a "random" header invented by the user).
Co-authored-by: Fermín Galán Márquez <fgalan@users.noreply.github.com>
….com:telefonicaid/fiware-orion into feature/4726-allow-overwriting-Kafka-headers
src/lib/ngsiNotify/Notifier.cpp
Outdated
| @@ -589,32 +625,13 @@ static SenderThreadParams* buildSenderParamsCustom | |||
| // | |||
| // 5. HTTP Headers (only in the case of HTTP notifications) | |||
There was a problem hiding this comment.
| // 5. HTTP Headers (only in the case of HTTP notifications) | |
| // 5. Headers (only in the case of HTTP and Kafka notifications). In the case of HTTP, we use proper HTTP headers, in the case of Kakfa we use... |
Need to end the sentence "we use..." :)
|
Is the PR ready to merge (after review)? Should [WIP] be removed from title? |
For now I think it’s fine to mix them; it meets the scope of this issue, but I have the feeling we’re missing tests for macro substitution (that could be done in a separate issue) and documentation for the Kafka headers. I’m not sure what the best place would be for that documentation. |
….com:telefonicaid/fiware-orion into feature/4726-allow-overwriting-Kafka-headers
Maybe you can add these tests in a separate PR (letting opened this one until we see how they go)? |
I agree. It is mostly clear for everyone what HTTP header and HTTP payload means, but not so sure in the Kafka world. I mean, in the .test I see things like this: But maybe is not so clear what "Key", "Headers" and "Payload" means from an encoding point of view. The best place to include that documentation maybe is https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/user/kafka_notifications.md. Maybe you can do a draft modification in this PR so I can provide feedback on it. |
…ature/4726-allow-overwriting-Kafka-headers
PR #4733 |
Fixed in #4879bfc |
|
@fisuda this PR does some modificdations to English .md files. It would be great if you could synchronise the Japanese translation, please. |
…of Fiware-Service / Fiware-ServicePath (telefonicaid#4727)
|
I sent the PR #4734. |
(JP) Kafka Notifications: allow extraHeaders and prioritize override of Fiware-Service / Fiware-ServicePath (#4727)
Issue
#4727#4726