@@ -73,6 +73,19 @@ public class AMQConnection extends ShutdownNotifierComponent implements Connecti
7373 /** Timeout used while waiting for a connection.close-ok (milliseconds) */
7474 public static final int CONNECTION_CLOSING_TIMEOUT = 10000 ;
7575
76+ private static final Object [] DEFAULT_CLIENT_PROPERTIES = new Object [] {
77+ "product" , LongStringHelper .asLongString ("RabbitMQ" ),
78+ "version" , LongStringHelper .asLongString (ClientVersion .VERSION ),
79+ "platform" , LongStringHelper .asLongString ("Java" ),
80+ "copyright" , LongStringHelper .asLongString (
81+ "Copyright (C) 2007-2008 LShift Ltd., " +
82+ "Cohesive Financial Technologies LLC., " +
83+ "and Rabbit Technologies Ltd." ),
84+ "information" , LongStringHelper .asLongString (
85+ "Licensed under the MPL. " +
86+ "See http://www.rabbitmq.com/" )
87+ };
88+
7689 private static final Version clientVersion =
7790 new Version (AMQP .PROTOCOL .MAJOR , AMQP .PROTOCOL .MINOR );
7891
@@ -376,16 +389,9 @@ public void writeFrame(Frame f) throws IOException {
376389 }
377390
378391 public Map <String , Object > buildClientPropertiesTable () {
379- return Frame .buildTable (new Object [] {
380- "product" , LongStringHelper .asLongString ("RabbitMQ" ),
381- "version" , LongStringHelper .asLongString (ClientVersion .VERSION ),
382- "platform" , LongStringHelper .asLongString ("Java" ),
383- "copyright" , LongStringHelper .asLongString ("Copyright (C) 2007-2008 LShift Ltd., " +
384- "Cohesive Financial Technologies LLC., " +
385- "and Rabbit Technologies Ltd." ),
386- "information" , LongStringHelper .asLongString ("Licensed under the MPL. " +
387- "See http://www.rabbitmq.com/" )
388- });
392+ Map <String , Object > props = Frame .buildTable (DEFAULT_CLIENT_PROPERTIES );
393+ props .putAll (_params .getClientProperties ());
394+ return props ;
389395 }
390396
391397 private static int negotiatedMaxValue (int clientValue , int serverValue ) {
0 commit comments