Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Corrrectly display multiple upstream URIs #683

Merged
merged 1 commit into from
Mar 21, 2019
Merged

Corrrectly display multiple upstream URIs #683

merged 1 commit into from
Mar 21, 2019

Conversation

velimir
Copy link
Contributor

@velimir velimir commented Mar 21, 2019

Proposed Changes

This pull request makes federation page correctly display upstreams with multiple URIs configured:

Federations accepts multiplie URIs to configure upstreams:

single upstream

{
  "component": "federation-upstream",
  "vhost": "/",
  "name": "single-upstream",
  "value": {
    "uri": "amqp://guest:guest@rabbit2",
    "ack-mode": "on-confirm",
    "trust-user-id": false
  }
}

multiple upstreams

{
  "component": "federation-upstream",
  "vhost": "/",
  "name": "multi-upstreams",
  "value": {
    "uri": [
      "amqp://guest:guest@rabbit2",
      "amqp://guest:guest@rabbit3"
    ],
    "ack-mode": "on-confirm",
    "trust-user-id": false
  }
}

which results in the following response:

[{
    "value": {
        "ack-mode": "on-confirm",
        "trust-user-id": false,
        "uri": ["amqp://guest:guest@rabbit2", "amqp://guest:guest@rabbit3"]
    },
    "vhost": "/",
    "component": "federation-upstream",
    "name": "multi-upstreams"
}, {
    "value": {
        "ack-mode": "on-confirm",
        "trust-user-id": false,
        "uri": "amqp://guest:guest@rabbit2"
    },
    "vhost": "/",
    "component": "federation-upstream",
    "name": "single-upstream"
}]

Before the change

before

After the change

after

Types of Changes

What types of changes does your code introduce to this project?

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

fix federations page where one federation can have multiple uris
@michaelklishin michaelklishin changed the title Upstream uris Corrrectly display multiple upstream URIs Mar 21, 2019
@michaelklishin
Copy link
Member

Thank you!

Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I reproduced this using master and confirmed this fix with the patch applied 👍

@lukebakken lukebakken merged commit f863ccd into rabbitmq:master Mar 21, 2019
lukebakken added a commit that referenced this pull request Mar 21, 2019
Corrrectly display multiple upstream URIs

(cherry picked from commit f863ccd)
@lukebakken
Copy link
Contributor

Backported to v3.7.x

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants