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

Shovels: dest-uri/src-uri can be lists of URIs in 3.8 #171

Closed
pathcl opened this issue Dec 27, 2020 · 1 comment
Closed

Shovels: dest-uri/src-uri can be lists of URIs in 3.8 #171

pathcl opened this issue Dec 27, 2020 · 1 comment
Milestone

Comments

@pathcl
Copy link
Contributor

pathcl commented Dec 27, 2020

Hey

It seems at some point shovel type changed for rabbit. Now for src-uri/dest-uri data types are arrays not
string anymore but []string

curl -u admin "127.0.0.1:15672/api/parameters"


[
  {
    "value": {
      "dest-add-forward-headers": true,
      "dest-add-timestamp-header": true,
      "dest-exchange": "someexchange",
      "dest-protocol": "amqp091",
      "dest-uri": [
        "amqp://user:password@server.domain.tld/tlm"
      ],
      "src-protocol": "amqp091",
      "src-queue": "somequeue",
      "src-uri": [
        "amqp://user:pass@server.domain.tld/are"
      ]
    },
    "vhost": "somevhost",
    "component": "shovel",
    "name": "someothershovel"                                                                                                                                                                                                                                  
  }                                                                                                                                                                                                                                                            
]

I realized this when I was adding support for shovels in terraformer which relies on rabbitmq provider which depends on rabbit-hole

020/12/27 14:51:11 json: cannot unmarshal array into Go struct field ShovelDefinition.value.dest-uri of type string
@michaelklishin michaelklishin changed the title shovel struct for dest-uri/src-uri compatibility on rabbit 3.8.9 Shovels: dest-uri/src-uri can be lists of URIs in 3.8 Jan 18, 2021
@michaelklishin
Copy link
Owner

Addressed in #174. Note that this is a minor breaking change to the public API.

@michaelklishin michaelklishin added this to the 2.7.0 milestone Jan 30, 2021
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