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

EdgeX Foundry is going to change the default message payload format in v4 #3528

Open
cloudxxx8 opened this issue Feb 2, 2025 · 4 comments
Open

Comments

@cloudxxx8
Copy link

What would you like to be added/modified:

If the source is EdgeX source or sink is EdgeX sink, the message envelope payload format will be different in v4.
We won't use base64 encoded for the normal JSON.

example from the original message:

{
  "ReceivedTopic":"",
  "CorrelationID":"14a42ea6-c394-41c3-8bcd-a29b9f5e6835",
  "ApiVersion":"v2",
  "RequestID":"e6e8a2f4-eb14-4649-9e2b-175247911369",
  "ErrorCode":0,
"Payload":"eyJhcGlWZXJzaW9uIjoidjIiLCJyZXF1ZXN0SWQiOiJlNmU4YTJmNC1lYjE0LTQ2NDktOWUyYi0xNzUyNDc5MTEzNjkiLCJzdGF0dXNDb2RlIjoyMDAsImRldmljZUNvcmVDb21tYW5kIjp7ImRldmljZU5hbWUiOiJSYW5kb20tQm9vbGVhbi1EZXZpY2UiLCJwcm9maWxlTmFtZSI6IlJhbmRvbS1Cb29sZWFuLURldmljZSIsImNvcmVDb21tYW5kcyI6W3sibmFtZSI6IldyaXRlQm9vbFZhbHVlIiwic2V0Ijp0cnVlLCJwYXRoIjoiL2FwaS92Mi9kZXZpY2UvbmFtZS9SYW5kb20tQm9vbGVhbi1EZXZpY2UvV3JpdGVCb29sVmFsdWUiLCJ1cmwiOiJodHRwOi8vZWRnZXgtY29yZS1jb21tYW5kOjU5ODgyIiwicGFyYW1ldGVycyI6W3sicmVzb3VyY2VOYW1lIjoiQm9vbCIsInZhbHVlVHlwZSI6IkJvb2wifSx7InJlc291cmNlTmFtZSI6IkVuYWJsZVJhbmRvbWl6YXRpb25fQm9vbCIsInZhbHVlVHlwZSI6IkJvb2wifV19LHsibmFtZSI6IldyaXRlQm9vbEFycmF5VmFsdWUiLCJzZXQiOnRydWUsInBhdGgiOiIvYXBpL3YyL2RldmljZS9uYW1lL1JhbmRvbS1Cb29sZWFuLURldmljZS9Xcml0ZUJvb2xBcnJheVZhbHVlIiwidXJsIjoiaHR0cDovL2VkZ2V4LWNvcmUtY29tbWFuZDo1OTg4MiIsInBhcmFtZXRlcnMiOlt7InJlc291cmNlTmFtZSI6IkJvb2xBcnJheSIsInZhbHVlVHlwZSI6IkJvb2xBcnJheSJ9LHsicmVzb3VyY2VOYW1lIjoiRW5hYmxlUmFuZG9taXphdGlvbl9Cb29sQXJyYXkiLCJ2YWx1ZVR5cGUiOiJCb29sIn1dfSx7Im5hbWUiOiJCb29sIiwiZ2V0Ijp0cnVlLCJzZXQiOnRydWUsInBhdGgiOiIvYXBpL3YyL2RldmljZS9uYW1lL1JhbmRvbS1Cb29sZWFuLURldmljZS9Cb29sIiwidXJsIjoiaHR0cDovL2VkZ2V4LWNvcmUtY29tbWFuZDo1OTg4MiIsInBhcmFtZXRlcnMiOlt7InJlc291cmNlTmFtZSI6IkJvb2wiLCJ2YWx1ZVR5cGUiOiJCb29sIn1dfSx7Im5hbWUiOiJCb29sQXJyYXkiLCJnZXQiOnRydWUsInNldCI6dHJ1ZSwicGF0aCI6Ii9hcGkvdjIvZGV2aWNlL25hbWUvUmFuZG9tLUJvb2xlYW4tRGV2aWNlL0Jvb2xBcnJheSIsInVybCI6Imh0dHA6Ly9lZGdleC1jb3JlLWNvbW1hbmQ6NTk4ODIiLCJwYXJhbWV0ZXJzIjpbeyJyZXNvdXJjZU5hbWUiOiJCb29sQXJyYXkiLCJ2YWx1ZVR5cGUiOiJCb29sQXJyYXkifV19XX19",
  "ContentType":"application/json",
  "QueryParams":{}
}

propse to change to:

{
  "ReceivedTopic":"",
  "CorrelationID":"14a42ea6-c394-41c3-8bcd-a29b9f5e6835",
  "ApiVersion":"v3",
  "RequestID":"e6e8a2f4-eb14-4649-9e2b-175247911369",
  "ErrorCode":0,
"Payload":{"apiVersion":"v3","requestId":"e6e8a2f4-eb14-4649-9e2b-175247911369","statusCode":200,"deviceCoreCommand":{"deviceName":"Random-Boolean-Device","profileName":"Random-Boolean-Device","coreCommands":[{"name":"WriteBoolValue","set":true,"path":"/api/v2/device/name/Random-Boolean-Device/WriteBoolValue","url":"http://edgex-core-command:59882","parameters":[{"resourceName":"Bool","valueType":"Bool"},{"resourceName":"EnableRandomization_Bool","valueType":"Bool"}]},{"name":"WriteBoolArrayValue","set":true,"path":"/api/v2/device/name/Random-Boolean-Device/WriteBoolArrayValue","url":"http://edgex-core-command:59882","parameters":[{"resourceName":"BoolArray","valueType":"BoolArray"},{"resourceName":"EnableRandomization_BoolArray","valueType":"Bool"}]},{"name":"Bool","get":true,"set":true,"path":"/api/v2/device/name/Random-Boolean-Device/Bool","url":"http://edgex-core-command:59882","parameters":[{"resourceName":"Bool","valueType":"Bool"}]},{"name":"BoolArray","get":true,"set":true,"path":"/api/v2/device/name/Random-Boolean-Device/BoolArray","url":"http://edgex-core-command:59882","parameters":[{"resourceName":"BoolArray","valueType":"BoolArray"}]}]}},
  "ContentType":"application/json",
  "QueryParams":{}
}

Why is this needed:

Please see the issue description:
edgexfoundry/go-mod-messaging#381

@ngjaying
Copy link
Collaborator

ngjaying commented Feb 5, 2025

@cloudxxx8 Thanks for letting us know. When will this feature released? We'll need to plan in what version to support this new format.

@cloudxxx8
Copy link
Author

@ngjaying the release date is targeting to Feb 26th

@ngjaying
Copy link
Collaborator

ngjaying commented Feb 5, 2025

@cloudxxx8 The schedule is tight. Can we use the main branch of https://github.com/edgexfoundry/edgex-compose to test?

@cloudxxx8
Copy link
Author

@ngjaying we plan to finish it in 2 days, and you can use the main branch to test. I will leave a comment here when it is ready.
I know the schedule is tight to you, and we can update the kuiper version in the docker-compose when you are also ready after the release.

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

2 participants