logger.info("declaring pubsub for inbound: " + name);
}
RabbitPropertiesAccessor accessor = new RabbitPropertiesAccessor(properties);
validateConsumerProperties(name, properties, SUPPORTED_PUBSUB_CONSUMER_PROPERTIES);
String prefix = accessor.getPrefix(this.defaultPrefix);
FanoutExchange exchange = new FanoutExchange(prefix + "topic." + name);
declareExchangeIfNotPresent(exchange);
String uniqueName = name + "." + UUID.randomUUID().toString();
Queue queue = new Queue(prefix + uniqueName, false, true, true);
declareQueueIfNotPresent(queue);
org.springframework.amqp.core.Binding binding = BindingBuilder.bind(queue).to(exchange);
this.rabbitAdmin.declareBinding(binding);
// register with context so they will be redeclared after a connection failure
this.autoDeclareContext.getBeanFactory().registerSingleton(queue.getName(), queue);
String bindingBeanName = exchange.getName() + "." + queue.getName() + ".binding";
if (!autoDeclareContext.containsBean(bindingBeanName)) {
this.autoDeclareContext.getBeanFactory().registerSingleton(bindingBeanName, binding);
}
doRegisterConsumer(name, moduleInputChannel, queue, accessor, true);
autoBindDLQ(uniqueName, accessor);