PlanQK / planqk-platform

PlanQK Platform Issue Repository
3 stars 0 forks source link

Encode payload of the Pub/Sub Topics uniformly regardless of the entity. #61

Closed darya-mart closed 2 years ago

darya-mart commented 2 years ago

Please, keep the basic payload structure of the Google Pub/Sub Topics about creation/modification/deletion of algorithm relations uniformly to the other entities.

Currently, by any changes on plattform entities (except of algorithm relations) a topic with the following payload is sended:

{projectId='project-name', subscriptionName='sub-name', message=data: "{"id":"data-id", "entityId ":"entity-id","platformEventType":"DELETEED", "userId":"user-id", "entityType":"Implementation", "entity":{embedded-json-with-entity-info},\"eventTimeStamp":"timestamp"}".

However, when an algorithm relation is created/modified/deleted, a topic with the following payload is pushed: {projectId='project-name', subscriptionName='sub-name', message=data: "{embedded-json-with-entity-info}." Here, especially critical is the absence of the metadata field entityType and the fact, that the embedded-json-with-entity-info is stored not in the field entity but directly in the field "data".