@Override protected void doDeclares() { AmqpAdmin admin = getAdmin(); if (admin != null && this.queue != null && admin.getQueueProperties(this.queue.getName()) == null) { admin.declareQueue(this.queue); } }
@Override protected void doDeclares() { AmqpAdmin admin = getAdmin(); if (admin != null && admin.getQueueProperties(this.queue.getName()) == null) { admin.declareQueue(this.queue); } }
@Override protected void doDeclares() { AmqpAdmin admin = getAdmin(); if (admin != null) { if (admin.getQueueProperties(this.queue.getName()) == null) { admin.declareQueue(this.queue); } if (this.exchange != null) { admin.declareExchange(this.exchange); } if (this.binding != null) { admin.declareBinding(this.binding); } } }
private void attemptDeclarations(AmqpAdmin amqpAdmin) { ApplicationContext context = this.getApplicationContext(); if (context != null) { Set<String> queueNames = getQueueNamesAsSet(); Map<String, Queue> queueBeans = context.getBeansOfType(Queue.class); for (Entry<String, Queue> entry : queueBeans.entrySet()) { Queue queue = entry.getValue(); if (isMismatchedQueuesFatal() || (queueNames.contains(queue.getName()) && amqpAdmin.getQueueProperties(queue.getName()) == null)) { if (logger.isDebugEnabled()) { logger.debug("Redeclaring context exchanges, queues, bindings."); } amqpAdmin.initialize(); break; } } } }
private void attemptDeclarations(AmqpAdmin amqpAdmin) { ApplicationContext context = this.getApplicationContext(); if (context != null) { Set<String> queueNames = getQueueNamesAsSet(); Map<String, Queue> queueBeans = context.getBeansOfType(Queue.class); for (Entry<String, Queue> entry : queueBeans.entrySet()) { Queue queue = entry.getValue(); if (isMismatchedQueuesFatal() || (queueNames.contains(queue.getName()) && amqpAdmin.getQueueProperties(queue.getName()) == null)) { if (logger.isDebugEnabled()) { logger.debug("Redeclaring context exchanges, queues, bindings."); } amqpAdmin.initialize(); break; } } } }
@Override protected void doDeclares() { AmqpAdmin admin = getAdmin(); if (admin != null && this.queue != null && admin.getQueueProperties(this.queue.getName()) == null) { admin.declareQueue(this.queue); } }
@Override protected void doDeclares() { AmqpAdmin admin = getAdmin(); if (admin != null && admin.getQueueProperties(this.queue.getName()) == null) { admin.declareQueue(this.queue); } }
Properties queueProperties = checkAdmin.getQueueProperties(queue); if (queueProperties == null && isMissingQueuesFatal()) { throw new IllegalStateException("At least one of the configured queues is missing");
Properties queueProperties = checkAdmin.getQueueProperties(queue); if (queueProperties == null && isMissingQueuesFatal()) { throw new IllegalStateException("At least one of the configured queues is missing");
@Override protected void doDeclares() { AmqpAdmin admin = getAdmin(); if (admin != null) { if (admin.getQueueProperties(this.queue.getName()) == null) { admin.declareQueue(this.queue); } if (this.exchange != null) { admin.declareExchange(this.exchange); } if (this.binding != null) { admin.declareBinding(this.binding); } } }