From 466ccddc1fde7810cd5d1ee91cf50f4b10518473 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Tue, 4 Jul 2006 17:15:00 +0000 Subject: [PATCH] made it possible to disable advisory message support for AMQ-794 git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@419049 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/broker/BrokerService.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index f5dee5923a..8c27ab1b3c 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -116,6 +116,7 @@ public class BrokerService implements Service, Serializable { private String masterConnectorURI; private JmsConnector[] jmsBridgeConnectors; //these are Jms to Jms bridges to other jms messaging systems private boolean deleteAllMessagesOnStartup; + private boolean advisorySupport = true; private URI vmConnectorURI; private PolicyMap destinationPolicy; private AtomicBoolean started = new AtomicBoolean(false); @@ -670,6 +671,17 @@ public class BrokerService implements Service, Serializable { public void setUseShutdownHook(boolean useShutdownHook) { this.useShutdownHook = useShutdownHook; } + + public boolean isAdvisorySupport() { + return advisorySupport; + } + + /** + * Allows the support of advisory messages to be disabled for performance reasons. + */ + public void setAdvisorySupport(boolean advisorySupport) { + this.advisorySupport = advisorySupport; + } public List getTransportConnectors() { return new ArrayList(transportConnectors); @@ -949,7 +961,9 @@ public class BrokerService implements Service, Serializable { */ protected Broker addInterceptors(Broker broker) throws Exception { broker = new TransactionBroker(broker, getPersistenceAdapter().createTransactionStore()); - broker = new AdvisoryBroker(broker); + if (isAdvisorySupport()) { + broker = new AdvisoryBroker(broker); + } broker = new CompositeDestinationBroker(broker); if (isPopulateJMSXUserID()) { broker = new UserIDBroker(broker);