diff --git a/src/main/java/io/cresco/agent/controller/communication/ActiveBroker.java b/src/main/java/io/cresco/agent/controller/communication/ActiveBroker.java index b1227b8..07a14ae 100644 --- a/src/main/java/io/cresco/agent/controller/communication/ActiveBroker.java +++ b/src/main/java/io/cresco/agent/controller/communication/ActiveBroker.java @@ -87,11 +87,12 @@ public ActiveBroker(ControllerEngine controllerEngine, String brokerName) { entry.setQueue(">"); //enable prioritization of messages in queues entry.setPrioritizedMessages(true); - //entry.setProducerFlowControl(true); + entry.setProducerFlowControl(true); entry.setTopic(">"); //enable prioritization of messages in queues entry.setPrioritizedMessages(true); + entry.setProducerFlowControl(true); //configure prefetch rate ratio to prevent exhaustion of resources from slow consumers int topicPrefetchLimit = plugin.getConfig().getIntegerParam("topic_prefetch_limit",1000); entry.setTopicPrefetch(topicPrefetchLimit); diff --git a/src/main/java/io/cresco/agent/controller/communication/ActiveClient.java b/src/main/java/io/cresco/agent/controller/communication/ActiveClient.java index 23cdd3c..a259eb2 100644 --- a/src/main/java/io/cresco/agent/controller/communication/ActiveClient.java +++ b/src/main/java/io/cresco/agent/controller/communication/ActiveClient.java @@ -198,6 +198,10 @@ private ActiveMQSslConnectionFactory initConnectionFactory(String URI) { try { activeMQSslConnectionFactory = new ActiveMQSslConnectionFactory(URI); + //activeMQSslConnectionFactory.setAlwaysSessionAsync(false); + //activeMQSslConnectionFactory.setOptimizeAcknowledge(true); + //activeMQSslConnectionFactory.setUseAsyncSend(true); + if(URI.startsWith("vm://")) { activeMQSslConnectionFactory.setObjectMessageSerializationDefered(true); }