List of usage examples for org.springframework.amqp.core Queue Queue
public Queue(String name, boolean durable, boolean exclusive, boolean autoDelete)
From source file:com.anton.dev.tqrbs2.QueuePublishProcess.java
private void setup() { Exchange exchange = DirectExchange.DEFAULT; boolean durable = true; for (int i = 1; i <= 5; i++) { String queueName = "test.queue." + i; Queue q = new Queue(queueName, durable, false, true); admin.declareQueue(q);//w w w . jav a 2s . c o m BindingBuilder.bind(q).to(exchange).with(queueName); LOGGER.info("Bounded queue " + queueName); } }
From source file:io.acme.solution.api.test.conf.RabbitTestConfigurer.java
@Bean public Queue getCommandsQueue() { log.info("Creating a durable exclusive test drain command queue as auto-delete with name: {" + this.queueName + "}"); return new Queue(this.queueName, true, true, true); }
From source file:org.carewebframework.amqp.rabbitmq.Broker.java
/** * Creates an event queue (thread safe) with the correct binding. * /* w w w . j a va 2 s. c om*/ * @param eventName Name of event handled by queue. */ private synchronized void createEventQueue(String eventName) { if (!queueExists(eventName)) { Queue queue = new Queue(eventName, true, false, true); declareQueue(queue); Binding binding = new Binding(eventName, DestinationType.QUEUE, exchange.getName(), eventName + ".#", null); declareBinding(binding); } }
From source file:org.openbaton.common.vnfm_sdk.amqp.VnfmSpringHelperRabbit.java
@PostConstruct private void init() throws IOException { log.info("Initialization of VnfmSpringHelperRabbit"); rabbitAdmin = new RabbitAdmin(connectionFactory); rabbitAdmin.declareExchange(new TopicExchange("openbaton-exchange")); rabbitAdmin/*w w w . j a v a 2s . c o m*/ .declareQueue(new Queue(RabbitConfiguration.queueName_vnfmRegister, true, exclusive, autodelete)); rabbitAdmin.declareBinding( new Binding(RabbitConfiguration.queueName_vnfmRegister, Binding.DestinationType.QUEUE, "openbaton-exchange", RabbitConfiguration.queueName_vnfmRegister, null)); }
From source file:org.openbaton.common.vnfm_sdk.amqp.configuration.RabbitConfiguration.java
@Bean
Queue queue_logDispatch() {
return new Queue(queueName_logDispatch, durable, exclusive, autodelete);
}
From source file:access.Application.java
@Bean public Queue updateJobsQueue() { return new Queue( String.format(JobMessageFactory.TOPIC_TEMPLATE, JobMessageFactory.UPDATE_JOB_TOPIC_NAME, SPACE), true, false, false);/*from ww w . j a v a 2 s . co m*/ }
From source file:org.resthub.rpc.HessianEndpoint.java
/** * Create a queue.//from w w w . j av a2 s. c om * * @param admin AMQPAdmin * @param name the name of the queue */ private void createQueue(AmqpAdmin admin, String name) { Queue requestQueue = new Queue(name, false, false, false); admin.declareQueue(requestQueue); }
From source file:org.openbaton.common.vnfm_sdk.amqp.configuration.RabbitConfiguration.java
@Bean Queue queue_genericVnfmActions() { Properties properties = new Properties(); try {//from ww w . j a va 2 s .c om properties.load(ClassLoader.getSystemResourceAsStream("conf.properties")); } catch (IOException e) { e.printStackTrace(); } queueName_nfvoGenericActions = "nfvo." + properties.getProperty("type") + ".actions"; return new Queue(queueName_nfvoGenericActions, durable, exclusive, autodelete); }
From source file:org.openbaton.common.vnfm_sdk.amqp.configuration.RabbitConfiguration.java
@Bean Queue queue_emsRegistrator() {/*from w w w . ja va 2 s .c o m*/ Properties properties = new Properties(); try { properties.load(ClassLoader.getSystemResourceAsStream("conf.properties")); } catch (IOException e) { e.printStackTrace(); } queueName_emsRegistrator = "ems." + properties.getProperty("type") + ".register"; return new Queue(queueName_emsRegistrator, durable, exclusive, autodelete); }
From source file:org.resthub.rpc.AMQPHessianProxyFactory.java
/** * Create a queue and an exchange for requests * //from w w w . jav a 2 s . c o m * @param connectionFactory * @param queueName the name of the queue * @param exchangeName the name of the exchange */ private void createRequestQueue(AmqpAdmin admin, String queueName, String exchangeName) { Queue requestQueue = new Queue(queueName, false, false, false); admin.declareQueue(requestQueue); DirectExchange requestExchange = new DirectExchange(exchangeName, false, false); admin.declareExchange(requestExchange); Binding requestBinding = BindingBuilder.bind(requestQueue).to(requestExchange).with(queueName); admin.declareBinding(requestBinding); }