Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Simplify configuration of the app within the spec file #59

Open
smoya opened this issue Oct 7, 2021 · 3 comments
Open

Simplify configuration of the app within the spec file #59

smoya opened this issue Oct 7, 2021 · 3 comments
Labels
enhancement New feature or request keep-open keep-open

Comments

@smoya
Copy link
Collaborator

smoya commented Oct 7, 2021

We want to keep this application to be configured mostly from reading an AsyncAPI file.
However, current configuration is done at proxied servers, which forces the user to modify their current servers (e.g. Kafka servers) adding a custom extension (x-eventgateway prefix).

Example:

servers:
  asyncapi-kafka-test:
    url: 'asyncapi-kafka-test-asyncapi-8f90.aivencloud.com:20472' # Kafka with 3 brokers.
    protocol: kafka-secure
    description: AsyncAPI Kafka test broker. Private.
    x-eventgateway-dial-mapping: '0.0.0.0:20473,event-gateway-demo.asyncapi.org:20473|0.0.0.0:20474,event-gateway-demo.asyncapi.org:20474|0.0.0.0:20475,event-gateway-demo.asyncapi.org:20475' # Dynamic ports starts at 20473

Instead, I suggest we rather configure the app by using the servers that describe the app.

servers:
  asyncapi-event-gateway-kafka-1:
    url: 'event-gateway-demo.asyncapi.org:28003'
    protocol: kafka
    x-eventgateway:
      proxy:
        kafka:
          server: asyncapi-kafka-test # as this is not a ref, this should be validated as we did in https://github.com/asyncapi/parser-js/pull/364
          dialMapping: '0.0.0.0:20473,event-gateway-demo.asyncapi.org:20473|0.0.0.0:20474,event-gateway-demo.asyncapi.org:20474|0.0.0.0:20475,event-gateway-demo.asyncapi.org:20475'

The benefits are multiple:

  • Existing servers are not changed.
  • Port binding + adverstised URL (the url of the actual application) is already available in the server.
  • Application can act as proxy of several servers by just creating a new server with a different port. Also supports different protocols. For example:
    servers:
      asyncapi-event-gateway-kafka-2:
        url: 'event-gateway-demo.asyncapi.org:28004' # note this port is different, but real server behind is the same.
        x-eventgateway:
          proxy:
            kafka:
              server: another-different-asyncapi-kafka-test
      asyncapi-event-gateway-mqtt:
        url: 'event-gateway-demo.asyncapi.org:1883'
        x-eventgateway:
          proxy:
            mqtt:
              server: a-mqtt-server
@github-actions
Copy link

github-actions bot commented Feb 5, 2022

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions
Copy link

github-actions bot commented Jun 7, 2022

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Jun 7, 2022
@smoya smoya removed the stale label Jun 10, 2022
@github-actions
Copy link

github-actions bot commented Oct 9, 2022

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Oct 9, 2022
@smoya smoya added keep-open keep-open and removed stale labels Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request keep-open keep-open
Projects
None yet
Development

No branches or pull requests

2 participants