testcontainers / testcontainers/testcontainers-dotnet

[Enhancement]: Protocol specific GetBrokerAddress overload for ActiveMq

Open
#1,447 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement module
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.