use of org.apache.activemq.broker.BrokerService in project storm by apache.
the class StormMqttIntegrationTest method start.
@BeforeClass
public static void start() throws Exception {
LOG.warn("Starting broker...");
broker = new BrokerService();
broker.addConnector("mqtt://localhost:1883");
broker.setDataDirectory("target");
broker.start();
LOG.debug("MQTT broker started");
}
use of org.apache.activemq.broker.BrokerService in project hive by apache.
the class TestMsgBusConnection method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
broker = new BrokerService();
// configure the broker
broker.addConnector("tcp://localhost:61616?broker.persistent=false");
broker.start();
System.setProperty("java.naming.factory.initial", "org.apache.activemq.jndi.ActiveMQInitialContextFactory");
System.setProperty("java.naming.provider.url", "tcp://localhost:61616");
connectClient();
HiveConf hiveConf = new HiveConf(this.getClass());
hiveConf.set(ConfVars.METASTORE_EVENT_LISTENERS.varname, NotificationListener.class.getName());
hiveConf.set(HiveConf.ConfVars.PREEXECHOOKS.varname, "");
hiveConf.set(HiveConf.ConfVars.POSTEXECHOOKS.varname, "");
hiveConf.set(HiveConf.ConfVars.METASTOREURIS.varname, "");
hiveConf.set(HiveConf.ConfVars.HIVE_SUPPORT_CONCURRENCY.varname, "false");
hiveConf.setVar(HiveConf.ConfVars.HIVE_AUTHORIZATION_MANAGER, "org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory");
hiveConf.set(HCatConstants.HCAT_MSGBUS_TOPIC_PREFIX, "planetlab.hcat");
SessionState.start(new CliSessionState(hiveConf));
driver = new Driver(hiveConf);
}
use of org.apache.activemq.broker.BrokerService in project quickstarts by jboss-switchyard.
the class JCAInflowBindingTest method startActiveMQBroker.
public static void startActiveMQBroker() throws Exception {
_broker = new BrokerService();
_broker.setBrokerName("default");
_broker.setUseJmx(false);
_broker.setPersistent(false);
_broker.setDataDirectoryFile(ACTIVEMQ_DATA_DIR);
_broker.addConnector(ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL);
SystemUsage systemUsage = _broker.getSystemUsage();
systemUsage.getMemoryUsage().setLimit(MEMORY_STORE_USAGE_LIMIT);
systemUsage.getTempUsage().setLimit(TEMP_STORE_USAGE_LIMIT);
_broker.start();
}
use of org.apache.activemq.broker.BrokerService in project camel by apache.
the class MQTTDuplicatesTest method testMqttDuplicatesAfterBrokerRestartWithClientID.
@Test
public void testMqttDuplicatesAfterBrokerRestartWithClientID() throws Exception {
brokerService.stop();
brokerService.waitUntilStopped();
LOG.info(">>>>>>>>>> Restarting broker...");
brokerService = new BrokerService();
brokerService.setPersistent(false);
brokerService.setAdvisorySupport(false);
brokerService.addConnector(MQTTTestSupport.getConnection() + "?trace=true");
brokerService.start();
brokerService.waitUntilStarted();
LOG.info(">>>>>>>>>> Broker restarted");
for (int i = 0; i < MESSAGE_COUNT; i++) {
String body = System.currentTimeMillis() + ": Dummy-restart-with-clientID! " + i;
templateWithClientID.asyncSendBody("direct:withClientID", body);
Thread.sleep(WAIT_MILLIS);
}
assertNoDuplicates();
}
use of org.apache.activemq.broker.BrokerService in project camel by apache.
the class MQTTTestSupport method newBrokerService.
public static BrokerService newBrokerService() throws Exception {
BrokerService service = new BrokerService();
service.setPersistent(false);
service.setAdvisorySupport(false);
service.addConnector(getConnection());
return service;
}
Aggregations