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

Fixing fetch broker information API #6000

Closed
xiangfu0 opened this issue Sep 10, 2020 · 2 comments
Closed

Fixing fetch broker information API #6000

xiangfu0 opened this issue Sep 10, 2020 · 2 comments
Assignees

Comments

@xiangfu0
Copy link
Contributor

xiangfu0 commented Sep 10, 2020

Current controller /brokers APIs only returns instance id and expect instance is in the format of ROLE_HOSTNAME_PORT, however this is not the right thing any more.
So we propose the new /broker/v2 APIs which expand the instance id to a json blob with the fields: instanceId/host/port/etc.

Current API:

➜ curl localhost:9000/brokers | jq .
{
  "tenants": {
    "DefaultTenant": [
        "Broker_127.0.0.1_8000"
    ]
  },
  "tables": {
    "airlineStats": [
        "Broker_127.0.0.1_8000"
    ]
  }
}

New API example:

➜ curl localhost:9000/brokers/v2 | jq .
{
  "tenants": {
    "DefaultTenant": [
      {
        "instanceId": "Broker_127.0.0.1_8000",
        "host": "127.0.0.1",
        "port": 8000
      }
    ]
  },
  "tables": {
    "airlineStats": [
      {
        "instanceId": "Broker_127.0.0.1_8000",
        "host": "127.0.0.1",
        "port": 8000
      }
    ]
  }
}

@KKcorps @kishoreg

@xiangfu0 xiangfu0 changed the title Fix broker apis Fixing fetch broker information API Sep 10, 2020
@xiangfu0 xiangfu0 self-assigned this Sep 10, 2020
@KKcorps
Copy link
Contributor

KKcorps commented Sep 23, 2020

@fx19880617 Should I take this up?

@xiangfu0
Copy link
Contributor Author

@fx19880617 Should I take this up?

please :)

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