1

The transportConnector uri in my activemq.xml config file is over 400 characters and I need to add even more to it. This is making it too hard to read and later edit.

<transportConnector name="ssl" uri="ssl://0.0.0.0:61617?transport.enabledProtocols=TLSv1.1,TLSv1.2&amp;transport.enabledCipherSuites=TLS_RSA_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&amp;needClientAuth=true&amp;maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600" />

Is there some syntax I can use to break this up into separate lines to make it more readable? Or can I configure the transport in another format, like a bean?

gtonic
  • 2,295
  • 1
  • 24
  • 32
Thirlan
  • 712
  • 1
  • 8
  • 26

1 Answers1

1

Basically we're speaking of splitting a long xml attribute to several lines, right?

You can format your attribute string by using tabs like this:

<transportConnector name="ssl" 
                    uri="ssl://0.0.0.0:61617?      
                         transport.enabledProtocols=TLSv1.1,TLSv1.2&amp;
                         transport.enabledCipherSuites=TLS_RSA_WITH_3DES_EDE_CBC_SHA,
                                                       TLS_RSA_WITH_AES_128_CBC_SHA,
                                                       TLS_RSA_WITH_AES_256_CBC_SHA,
                                                       TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
                                                       TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&amp;
                         needClientAuth=true&amp;
                         maximumConnections=1000&amp;
                         wireFormat.maxFrameSize=104857600" />

For more details refer these posts: Adding a linebreak in some attribute string(like src or href ) in HTML / XML source

String attribute values in multiple lines, HTML

Community
  • 1
  • 1
gtonic
  • 2,295
  • 1
  • 24
  • 32