Closed
Bug 1451805
Opened 7 years ago
Closed 6 years ago
Define equivalent of "baseUrl" for exchanges
Categories
(Taskcluster :: Services, enhancement)
Taskcluster
Services
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dustin, Assigned: dustin)
References
Details
The documentation
https://docs.taskcluster.net/reference/platform/taskcluster-queue/references/events
says "exchange/taskcluster-queue/v1/task-defined". But that might not be the exchange name on another deployment. It's not even clear if we would expect another deployment to follow the `exchange/<namespace>/` and `queue/<namespace>/` pattern.
More importantly, taskcluster-client needs to know how to generate the exchange names, and what queue names to use.
Assignee | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Commits pushed to master at https://github.com/taskcluster/taskcluster-docs
https://github.com/taskcluster/taskcluster-docs/commit/705284804e423dfe5e26ec3372089990eec1d108
Bug 1451805 - add docs of pulse naming conventions
https://github.com/taskcluster/taskcluster-docs/commit/6cae36a30cc1ed559f43be3803cf258f7ef80a9c
Merge pull request #246 from djmitche/bug1451805
Bug 1451805 - add docs of pulse naming conventions
Updated•7 years ago
|
Assignee: nobody → dustin
Assignee | ||
Comment 3•7 years ago
|
||
Proposal: fix the pulse namespace (as defined by tc-pulse), and then have tc-pulse provide an exchangePrefix (and queuePrefix) for each namespace, along with the existing username.
So for a client, given a rootUrl, wishing to listen to messages from tc-github:
1. Configure tc-client with the rootUrl and call pulse.namespace(reference.name) ('github')
2. Construct the exchange name as `<exchangePrefix>/<reference.version>/<exchange>`, e.g.,
taskcluster-exchanges/github/v1/pull-request
---------------------------- -- ------------
3. Listen on that exchange.
For a service, given its rootUrl, wishing to publish messages:
1. Call pulse.claimNamespace(reference.name)
2. Construct exchange names .. same from here on out
This would require a bit more configurability from tc-pulse:
- mapping from (namespace, n) to a username (currently just `<username>-<n>`)
- mapping from namespace to exchangePrefix
- mapping from namespace to queuePrefix
That would need to be flexible enough to keep our existing exchange names, while also allowing multiple TC clusters to run on the same AMQP server (each will have a namespace `queue` that will need to map to different users, exchanges, etc.).
Flags: needinfo?(jopsen)
Flags: needinfo?(bstack)
Assignee | ||
Comment 4•7 years ago
|
||
Sorry, the info I need is: does that solution sound practical and does it address the issue?
Comment 5•7 years ago
|
||
This seems really awesome.
Updated•7 years ago
|
Flags: needinfo?(bstack)
Comment 6•7 years ago
|
||
> That would need to be flexible enough to keep our existing exchange names, while also allowing multiple TC clusters to run on the same AMQP server
Running multiple TC clusters on the same AMQP server seems like a bad idea. If so using virtual hosts would do the trick.
But this would effectively introduce a new exchangePrefix that tc-pulse have to distribute to all consumers.
hmm, I guess it could work. I would suggest a single TC cluster per AMQP vhost.
That way tc-pulse just returns a RabbitMQ connection string, and exchanges have the same names between deployments.
Flags: needinfo?(jopsen)
Assignee | ||
Comment 7•6 years ago
|
||
In bug 1465166 I began building exchange names using projectName, which is fixed and not dependent on the rootUrl or anything like that. This might make testing a little difficult, but we can worry about that later.
With that change, everything in exchanges.json is independent of rootUrl.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: Redeployability → Services
You need to log in
before you can comment on or make changes to this bug.
Description
•