/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(URI brokerURI) throws Exception { return createBroker(brokerURI, false); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(String brokerURI) throws Exception { return createBroker(new URI(brokerURI)); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(String brokerURI, boolean startBroker) throws Exception { return createBroker(new URI(brokerURI), startBroker); }
/** */ protected BrokerService createBroker() throws Exception, URISyntaxException { return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false")); }
broker = brokerFactoryHandler.createBroker(brokerURI); } else { broker = BrokerFactory.createBroker(brokerURI);
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(URI brokerURI) throws Exception { return createBroker(brokerURI, false); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(URI brokerURI) throws Exception { return createBroker(brokerURI, false); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(URI brokerURI) throws Exception { return createBroker(brokerURI, false); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(String brokerURI) throws Exception { return createBroker(new URI(brokerURI)); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(String brokerURI, boolean startBroker) throws Exception { return createBroker(new URI(brokerURI), startBroker); }
/** * Create an embedded ActiveMQ broker using a configuration URI. * * @param configurationURI the location of the configuration for the embedded broker. */ public EmbeddedActiveMQBroker(String configurationURI) { try { brokerService = BrokerFactory.createBroker(configurationURI); } catch (Exception ex) { throw new RuntimeException("Exception encountered creating embedded ActiveMQ broker from configuration URI: " + configurationURI, ex); } }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(String brokerURI, boolean startBroker) throws Exception { return createBroker(new URI(brokerURI), startBroker); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(String brokerURI) throws Exception { return createBroker(new URI(brokerURI)); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(String brokerURI) throws Exception { return createBroker(new URI(brokerURI)); }
/** * Create an embedded ActiveMQ broker using a configuration URI * * @param configurationURI the location of the configuration for the embedded broker. */ public EmbeddedActiveMQBroker(URI configurationURI) { try { brokerService = BrokerFactory.createBroker(configurationURI); } catch (Exception ex) { throw new RuntimeException("Exception encountered creating embedded ActiveMQ broker from configuration URI: " + configurationURI, ex); } }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @throws Exception */ public static BrokerService createBroker(String brokerURI) throws Exception { return createBroker(new URI(brokerURI)); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(String brokerURI, boolean startBroker) throws Exception { return createBroker(new URI(brokerURI), startBroker); }
/** * Creates a broker from a URI configuration * * @param brokerURI the URI scheme to configure the broker * @param startBroker whether or not the broker should have its * {@link BrokerService#start()} method called after * construction * @throws Exception */ public static BrokerService createBroker(String brokerURI, boolean startBroker) throws Exception { return createBroker(new URI(brokerURI), startBroker); }
@Bean public BrokerService brokerService() throws Exception { return BrokerFactory.createBroker(String.format("broker:(vm://localhost,stomp://localhost:%d)" + "?persistent=false&useJmx=false&useShutdownHook=true", stompPort)); }
@Bean(initMethod = "start", destroyMethod = "stop") @ConditionalOnProperty(prefix = "todo.jms", value = "broker", havingValue = "enabled", matchIfMissing = true) public BrokerService messageBroker() { try { BrokerService messageBroker = BrokerFactory.createBroker(String.format("broker:tcp://%s:%s", brokerHost, brokerPort)); messageBroker.setPersistent(false); messageBroker.setUseJmx(false); return messageBroker; } catch (Exception e) { throw new BeanCreationException("Failed to create embedded message broker", e); } }