The key attribute in the Kafka sink configuration is not correctly populated in eKuiper version 1.14.6+ when using a pattern-based key assignment. The issue was not present in version 1.14.6, where the key was correctly derived from the events generated by the SQL query.
Steps to Reproduce:
Kafka Sink Configuration: The following Kafka sink configuration is used:
3. Kafka Topic Observation: The Kafka topic receives messages with key: {{.key}} instead of the expected value derived from the key attribute in the events. Expected Key: TempHumPres
![image](https://github.com/user-attachments/assets/1788777e-c5bf-4f40-a738-8cadec1a4274)
4. Previous Behavior: In version 1.14.6, the same configuration correctly populated the Kafka key based on the key attribute in the event.
![image](https://github.com/user-attachments/assets/4442fed3-e664-4401-8337-beb8d425018b)
Environment:
lscpu
): OS (e.g. cat /etc/os-release): Debian GNU/Linux 11 (bullseye)" Others: deploymen as docker container, image version: docker pull lfedge/ekuiper:2.0-fullThe key attribute in the Kafka sink configuration is not correctly populated in eKuiper version 1.14.6+ when using a pattern-based key assignment. The issue was not present in version 1.14.6, where the key was correctly derived from the events generated by the SQL query.
Steps to Reproduce:
{ "humidity": 48.2, "key": "TempHumPres", "topic": "TempHumPres/get/sensor/2" }
{ "key": "TempHumPres", "temperature": 22.4, "topic": "TempHumPres/get/sensor/1" }
{ "key": "TempHumPres", "pressure": 1005.7, "topic": "TempHumPres/get/sensor/3" }