Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instability on correlation key definition in sink configuration #42

Open
Klaus-Nji-sp opened this issue May 5, 2020 · 1 comment
Open

Comments

@Klaus-Nji-sp
Copy link

Klaus-Nji-sp commented May 5, 2020

I ran the simple ping-pong example without issue most of the day. Then I attempted to model my own process based on the ping-pong example but could not get the sink to pick up the message with my own correlation key. The error I have been getting all day is:

com.jayway.jsonpath.PathNotFoundException: No results for path: $['correlationKey']\n\tat com.jayway.jsonpath.internal.path.EvaluationContextImpl.getValue

It does not matter what key I define. And yes, my workflow is defining the message correlation key as a FEEL expression =key

I even went back and modified the original ping-pong example and the sink can no longer correlate messages to the workflow. I wonder if this is related to #35 as the record is certainly over escaped.

Here is the Kafka message received by the sink connector:

[{"topic":"pong-topic","partition":0,"offset":0,"timestamp":1588651176053,"timestampType":"CREATE_TIME","headers":[],"key":"4503599627370509","value":"\"{\\\"key\\\":4503599627370509,\\\"type\\\":\\\"ping-eventType\\\",\\\"customHeaders\\\":{\\\"topic\\\":\\\"pong-topic\\\"},\\\"workflowInstanceKey\\\":4503599627370501,\\\"bpmnProcessId\\\":\\\"kafka-connector-test\\\",\\\"workflowDefinitionVersion\\\":1,\\\"workflowKey\\\":2251799813685252,\\\"elementId\\\":\\\"kafka-source\\\",\\\"elementInstanceKey\\\":4503599627370508,\\\"worker\\\":\\\"kafka-connector\\\",\\\"retries\\\":3,\\\"deadline\\\":1588651180659,\\\"variables\\\":\\\"{\\\\\\\"key\\\\\\\":\\\\\\\"12345\\\\\\\",\\\\\\\"payload\\\\\\\":{\\\\\\\"foo\\\\\\\":\\\\\\\"bar\\\\\\\"},\\\\\\\"eventType\\\\\\\":\\\\\\\"ping-eventType\\\\\\\"}\\\",\\\"variablesAsMap\\\":{\\\"key\\\":\\\"12345\\\",\\\"payload\\\":{\\\"foo\\\":\\\"bar\\\"},\\\"eventType\\\":\\\"ping-eventType\\\"}}\"","__confluent_index":0}]

@Klaus-Nji-sp
Copy link
Author

I have narrowed this down to this line in the config:

"message.path.variables": "$.variablesAsMap.payload",

If I change that line to:

"message.path.variables": "$.variablesAsMap",

Messages are not published to Kafka.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant