Skip to content

Provide a friendly way to set connection name #105

@Zerpet

Description

@Zerpet

The client provided connection name is very useful to identify connections in Management UI and during debugging sessions. In the Java Client, it's quite easy to set a client provided name with ConnectionFactory.newConnection(string clientName). In this client, a user has to set a configuration property with a specific name, for example:

connection, err := amqp.DialConfig(
		amqpURI,
		amqp.Config{Properties: map[string]interface{}{"connection_name": "sample-producer"}},
	)

This isn't great because the user is required to know the property key connection_name and the Properties map has to be crafted manually.

We should either provide a simple function like amqp.SetConnectionName(amqp.Config, string), or a constant with the connection name key (and any other well-known properties).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions