testcontainers / testcontainers/testcontainers-dotnet
[Enhancement]: Protocol specific GetBrokerAddress overload for ActiveMq
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.4k
- Forks
- 357
- Avg merge
- 14h 42m
- Merged PRs (30d)
- 16
Description
Problem
I'm using the Artemis container in a project using AmqpNetLite, and I'd like to be able to substitute the connection string 1:1 from the normal configuration. However, GetBrokerAddress() outputs it in the format tcp://{username}:{password}@{address}:{mappedPort}/. AmqpNetLite however, expects amqp:// or amqps://.
Solution
It would be useful to be able to optionally specify the desired protocol: perhaps instead of just a string we could use an enum to limit the input to what Artemis officially supports.
Benefit
Even more usable out-of-the-box (in more use cases than just when using Apache.NMS.ActiveMQ). Now I have to either build my own connection string or use string substitution to change tcp into amqp.
Alternatives
Alternatively we could build separate methods such as GetAmqpBrokerAddress() and GetMqttBrokerAddress() to make intent more clear.
Would you like to help contributing this enhancement?
Yes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the GetBrokerAddress() implementation and its existing tests, then review how broker connection strings are assembled. Define how the requested protocol option should be exposed and verify that the resulting address uses the selected Artemis-supported protocol while preserving the current default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100