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

REMReM should handle automatic domainID for semantics #138

Open
sudharshan-bandaru opened this issue Apr 27, 2021 · 2 comments · May be fixed by eiffel-community/eiffel-remrem-generate#223 or eiffel-community/eiffel-remrem-publish#291

Comments

@sudharshan-bandaru
Copy link

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
Copy link
Contributor

z-sztrom commented Mar 26, 2024

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:

  • If configuration file is not shared between generate and publish services, customer may get confused: Why a rabbitmq property should be configured for generate servcie?
  • If a new, top-level property, say domainId, is defined (not part of rabbitmq.instances.jsonlist) for generate service, how the properties should be interpreted when both of them are used?
  • rabbitmq.instances.jsonlist maps domainId to mp (message protocol). Should that feature be supported for generate service, too?
domainId: default-domain-A
...
rabbitmq.instances.jsonlist: [\
  {\
    ...
    "mp": "eiffelsemantics",\
    "domainId": "default-domain-B",\
    ...
  }\
]

@z-sztrom
Copy link
Contributor

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