当前位置: 首页>>代码示例>>Java>>正文


Java BrokerService.deleteAllMessages方法代码示例

本文整理汇总了Java中org.apache.activemq.broker.BrokerService.deleteAllMessages方法的典型用法代码示例。如果您正苦于以下问题:Java BrokerService.deleteAllMessages方法的具体用法?Java BrokerService.deleteAllMessages怎么用?Java BrokerService.deleteAllMessages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.activemq.broker.BrokerService的用法示例。


在下文中一共展示了BrokerService.deleteAllMessages方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
protected void configureBroker(BrokerService broker) throws Exception {
    broker.setUseJmx(true);
    broker.setPersistent(true);
    broker.setDataDirectory("target/activemq-data");
    broker.deleteAllMessages();
    broker.setAdvisorySupport(true);
    broker.addConnector(brokerUri);

    // configure expiration rate
    ActiveMQQueue queueName = new ActiveMQQueue(">");
    PolicyEntry entry = new PolicyEntry();
    entry.setDestination(queueName);
    entry.setExpireMessagesPeriod(1000);

    PolicyMap policyMap = new PolicyMap();
    policyMap.put(queueName, entry);
    broker.setDestinationPolicy(policyMap);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:20,代码来源:QueueProducerQoSTest.java

示例2: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
protected BrokerService createBroker() throws Exception {
   BrokerService broker = new BrokerService();
   broker.getSystemUsage().getMemoryUsage().setLimit(1 * 1024 * 1024); //1MB
   broker.deleteAllMessages();

   PolicyMap policyMap = new PolicyMap();
   PolicyEntry policyEntry = new PolicyEntry();
   policyEntry.setProducerFlowControl(false);
   policyMap.put(new ActiveMQQueue(">"), policyEntry);
   broker.setDestinationPolicy(policyMap);

   LOG.info("Starting broker with persistenceAdapterChoice " + persistenceAdapterChoice.toString());
   setPersistenceAdapter(broker, persistenceAdapterChoice);
   broker.getPersistenceAdapter().deleteAllMessages();

   return broker;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:18,代码来源:MemoryLimitTest.java

示例3: beforeClass

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@BeforeClass
public static void beforeClass() throws Exception {
    Locale.setDefault(Locale.ENGLISH);

    // some dummy values
    AuditorModuleContext.getContext().getConfig().setAuditRepositoryHost("localhost");
    AuditorModuleContext.getContext().getConfig().setAuditRepositoryPort(514);

    jmsBroker = new BrokerService();
    jmsBroker.addConnector(JMS_BROKER_URL);
    jmsBroker.setUseJmx(false);
    jmsBroker.setPersistent(false);
    jmsBroker.deleteAllMessages();
    jmsBroker.start();
}
 
开发者ID:oehf,项目名称:ipf-oht-atna,代码行数:16,代码来源:JmsAuditMessageQueueTest.java

示例4: startRemoteBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
protected void startRemoteBroker(boolean delete) throws Exception {
   remoteBroker = new BrokerService();
   remoteBroker.addConnector("tcp://localhost:61616");
   if (delete) {
      remoteBroker.deleteAllMessages();
   }
   remoteBroker.setUseJmx(false);
   remoteBroker.start();
   remoteBroker.waitUntilStarted();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:11,代码来源:ProxyFailoverTest.java

示例5: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
protected BrokerService createBroker() throws Exception {
   BrokerService broker = super.createBroker();
   broker.getSystemUsage().getStoreUsage().setLimit(10 * 1024);
   broker.deleteAllMessages();
   return broker;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:8,代码来源:StoreUsageTest.java

示例6: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
protected BrokerService createBroker() throws Exception {
   File schedulerDirectory = new File("target/scheduler");

   IOHelper.mkdirs(schedulerDirectory);
   IOHelper.deleteChildren(schedulerDirectory);

   BrokerService broker = super.createBroker();
   broker.setSchedulerSupport(true);
   broker.setSchedulerDirectoryFile(schedulerDirectory);
   broker.getSystemUsage().getJobSchedulerUsage().setLimit(7 * 1024);
   broker.deleteAllMessages();
   return broker;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:15,代码来源:JobSchedulerStoreUsageTest.java

示例7: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
protected BrokerService createBroker() throws Exception {
   BrokerService broker = super.createBroker();
   broker.getSystemUsage().getMemoryUsage().setLimit(Long.MAX_VALUE);
   broker.getSystemUsage().setCheckLimitsLogLevel(limitsLogLevel);
   broker.deleteAllMessages();
   return broker;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:9,代码来源:StoreUsageLimitsTest.java

示例8: createBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
protected BrokerService createBroker() throws Exception {
   File schedulerDirectory = new File("target/scheduler");

   IOHelper.mkdirs(schedulerDirectory);
   IOHelper.deleteChildren(schedulerDirectory);

   BrokerService broker = super.createBroker();
   broker.setSchedulerSupport(true);
   broker.setDataDirectory("target");
   broker.setSchedulerDirectoryFile(schedulerDirectory);
   broker.getSystemUsage().getStoreUsage().setLimit(1 * 512);
   broker.deleteAllMessages();
   return broker;
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:16,代码来源:JobSchedulerBrokerShutdownTest.java

示例9: setUp

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
@Override
protected void setUp() throws Exception {
   super.setUp();
   broker = new BrokerService();
   broker.setPersistent(true);
   broker.setUseJmx(true);
   broker.deleteAllMessages();
   broker.addConnector("tcp://localhost:0");
   broker.start();
   broker.waitUntilStarted();
   dest = new ActiveMQQueue(destinationName);
   resetCounters();
   brokerURL = broker.getTransportConnectors().get(0).getPublishableConnectString();
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:15,代码来源:DispatchMultipleConsumersTest.java

示例10: configureBroker

import org.apache.activemq.broker.BrokerService; //导入方法依赖的package包/类
protected void configureBroker(BrokerService broker) throws Exception {
    broker.setUseJmx(true);
    broker.setPersistent(false);
    broker.deleteAllMessages();
    broker.addConnector(brokerUri);
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:JmsTestSupport.java


注:本文中的org.apache.activemq.broker.BrokerService.deleteAllMessages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。