eiffel-community / eiffel-remrem-semantics

eiffel-remrem-semantics
https://eiffel-community.github.io/eiffel-remrem-semantics/
Other
4 stars 55 forks source link

REMReM should handle automatic domainID for semantics #138

Open sudharshan-bandaru opened 3 years ago

sudharshan-bandaru commented 3 years ago

Description

REMReM-semantics doesn't add the default domain id if not provided by the user. This improvement has to add the default domainId if its not available

Motivation

If there is no domainId present in the event, REMReM semantics has to add the default domainId

Exemplification

Benefits

Even in the case of User is not provided the domainId REMReM-semantics will add the default domainId

Possible Drawbacks

None

z-sztrom commented 6 months ago

This should be probably implemented as a change of eiffel-remrem-generate. Today there's something similar as part of eiffel-remrem-publish. It's application.properties file holds list rabbitmq.instances.jsonlist containing json property domainId:

# REMReM -> MB RabbitMQ Exchange configurations
rabbitmq.instances.jsonlist: [\
  {\
    "mp": "eiffel3",\
    "host": "mb123s11-trmber.e2c.ericsson.se",\
    "port": 5671,\
    "username": "eiffelamqp",\
    "password": "{ENC(FPHr73WFe2pf/kCMBFod2c1gSUWpMHTb)}",\
    "exchangeName": "mb123s11-trmber",\
    "tls": "default",\
    "domainId": "trmber.seli1.rem123s11",\
    "createExchangeIfNotExisting": "true",\
    "channelsCount": 1,\
    "tcpTimeOut": 60000,\
    "waitForConfirmsTimeOut": 5000\
  },\
  {\
    "mp": "eiffelsemantics",\
    "host": "mb123s11-trmber.e2c.ericsson.se",\
    "port": 5671,\
    "username": "eiffelamqp",\
    "password": "{ENC(FPHr73WFe2pf/kCMBFod2c1gSUWpMHTb)}",\
    "exchangeName": "mb123s11-trmber-e2",\
    "tls": "default",\
    "domainId": "trmber.seli1.rem123s11",\
    "createExchangeIfNotExisting": "true",\
    "channelsCount": 1,\
    "tcpTimeOut": 60000,\
    "waitForConfirmsTimeOut": 5000\
  }\
]

Similar approach could be used for eiffel-remrem-generate..

Configuration file of generate and publish services share a lot of properties and usually the same file is used for both services (configuration of generate is a subset of configuration of publish service). If domainId property from rabbitmq.instances.jsonlist was used, it'd bring some complications:

z-sztrom commented 4 months ago

Implementation provided by https://github.com/eiffel-community/eiffel-remrem-generate/pull/223 and https://github.com/eiffel-community/eiffel-remrem-publish/pull/291.