Skip to content

[Enhancement]: Protocol specific GetBrokerAddress overload for ActiveMq #1447

@YVbakker

Description

@YVbakker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmoduleAn official Testcontainers module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions