Skip to content

Commit 85a699d

Browse files
authored
Merge pull request #177 from rabbitmq/client-provided-connection-name
Add ConnectionBuilder#name(String)
2 parents 9fe170d + 784ec21 commit 85a699d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/main/java/com/rabbitmq/client/amqp/ConnectionBuilder.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
/** Builder for {@link Connection} instances. */
2424
public interface ConnectionBuilder extends ConnectionSettings<ConnectionBuilder> {
2525

26+
/**
27+
* Set the name of the connection.
28+
*
29+
* <p>The name of the connection will be displayed in the management UI.
30+
*
31+
* @param name client-provided connection name
32+
* @return this builder instance
33+
*/
34+
ConnectionBuilder name(String name);
35+
2636
/**
2737
* Configuration for recovery.
2838
*

src/main/java/com/rabbitmq/client/amqp/impl/AmqpConnectionBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void copyTo(AmqpConnectionBuilder copy) {
168168
copy.dispatchingExecutor(this.dispatchingExecutor);
169169
}
170170

171-
AmqpConnectionBuilder name(String name) {
171+
public AmqpConnectionBuilder name(String name) {
172172
this.name = name;
173173
return this;
174174
}

0 commit comments

Comments
 (0)