This closes #819

This commit is contained in:
jbertram 2016-10-05 10:53:01 -05:00
commit f6f633123d
2 changed files with 23 additions and 9 deletions

View File

@ -30,7 +30,7 @@ under the License.
<core xmlns="urn:activemq:core"> <core xmlns="urn:activemq:core">
<!-- this could be ASYNCIO or NIO --> <!-- this could be ASYNCIO or NIO -->
<journal-type>NIO</journal-type> <journal-type>ASYNCIO</journal-type>
<paging-directory>./data/paging</paging-directory> <paging-directory>./data/paging</paging-directory>
<bindings-directory>./data/bindings</bindings-directory> <bindings-directory>./data/bindings</bindings-directory>
<journal-directory>./data/journal</journal-directory> <journal-directory>./data/journal</journal-directory>
@ -45,10 +45,21 @@ under the License.
--> -->
<journal-buffer-timeout>1591999</journal-buffer-timeout> <journal-buffer-timeout>1591999</journal-buffer-timeout>
<!-- how often we are looking for how many bytes are being used on the disk in ms -->
<disk-scan-period>5000</disk-scan-period>
<!-- once the disk hits this limit the system will block, or close the connection in certain protocols
that won't support flow control. -->
<max-disk-usage>90</max-disk-usage>
<!-- the system will enter into page mode once you hit this limit.
This is an estimate in bytes of how much the messages are using in memory -->
<global-max-size>104857600</global-max-size>
<acceptors> <acceptors>
<!-- Default ActiveMQ Artemis Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP. --> <!-- Default ActiveMQ Artemis Acceptor. Multi-protocol adapter. Currently supports Core, OpenWire, Stomp and AMQP. -->
<!-- performance tests have shown that openWire performs best with these buffer sizes --> <!-- performance tests have shown that openWire performs best with these buffer sizes -->
<acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor> <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=XXXX</acceptor>
<!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.--> <!-- AMQP Acceptor. Listens on default AMQP port for AMQP traffic.-->
<acceptor name="amqp">tcp://0.0.0.0:5672?protocols=AMQP</acceptor> <acceptor name="amqp">tcp://0.0.0.0:5672?protocols=AMQP</acceptor>
@ -82,9 +93,10 @@ under the License.
<dead-letter-address>jms.queue.DLQ</dead-letter-address> <dead-letter-address>jms.queue.DLQ</dead-letter-address>
<expiry-address>jms.queue.ExpiryQueue</expiry-address> <expiry-address>jms.queue.ExpiryQueue</expiry-address>
<redelivery-delay>0</redelivery-delay> <redelivery-delay>0</redelivery-delay>
<max-size-bytes>10485760</max-size-bytes> <!-- with -1 only the global-max-size is in use for limiting -->
<max-size-bytes>-1</max-size-bytes>
<message-counter-history-day-limit>10</message-counter-history-day-limit> <message-counter-history-day-limit>10</message-counter-history-day-limit>
<address-full-policy>BLOCK</address-full-policy> <address-full-policy>PAGE</address-full-policy>
<auto-create-jms-queues>true</auto-create-jms-queues> <auto-create-jms-queues>true</auto-create-jms-queues>
</address-setting> </address-setting>
</address-settings> </address-settings>

View File

@ -144,11 +144,13 @@ public class OsgiBroker {
private String[] getRequiredProtocols(Set<TransportConfiguration> acceptors) { private String[] getRequiredProtocols(Set<TransportConfiguration> acceptors) {
ArrayList<String> protocols = new ArrayList<>(); ArrayList<String> protocols = new ArrayList<>();
for (TransportConfiguration acceptor : acceptors) { for (TransportConfiguration acceptor : acceptors) {
String protocolsFromAcceptor = acceptor.getParams().get(TransportConstants.PROTOCOLS_PROP_NAME).toString(); Object protocolsFromAcceptor = acceptor.getParams().get(TransportConstants.PROTOCOLS_PROP_NAME);
String[] protocolsSplit = protocolsFromAcceptor.split(","); if (protocolsFromAcceptor != null) {
for (String protocol : protocolsSplit) { String[] protocolsSplit = protocolsFromAcceptor.toString().split(",");
if (!protocol.contains(protocol)) { for (String protocol : protocolsSplit) {
protocols.add(protocol); if (!protocols.contains(protocol)) {
protocols.add(protocol);
}
} }
} }
} }