I am using Embedded ActiveMQ for sending messages from Server to Client using NetworkConnector using a static address and using a local Broker URL to connect to this Network Connector. This is working fine when Network Connectivity betweeen Local Machine(local URL) and NetworkConnector URL is present. However, when connectivity fails between the two the messages should get be persisted and when connectivity comes back again it should send those messages. However, this is not happening.Thx in advance
Server code is Given Below
broker = new BrokerService();
String localBrokerURL =
ConfigFile.getProperty("local.broker.url");
File file = new File(PERSISTENCE_DIR);
file.mkdir();
broker.addNetworkConnector("static:("
+ ConfigFile.getProperty("server.broker.url") + ")");
KahaPersistenceAdapter adapter = new KahaPersistenceAdapter();
adapter.setDirectory(file);
broker.setPersistenceAdapter(adapter);
broker.setTmpDataDirectory(file);
broker.setKeepDurableSubsActive(true);
broker.setPersistent(true);
broker.addConnector(localBrokerURL);
broker.setAdvisorySupport(true);
broker.setUseJmx(false);
broker.start();