Merge pull request #93 from markfisher/INT-2136
Only require 'queue-names' if no container ref
This commit is contained in:
@@ -107,6 +107,10 @@ abstract class AbstractAmqpInboundAdapterParser extends AbstractSingleBeanDefini
|
||||
protected abstract void configureChannels(Element element, ParserContext parserContext, BeanDefinitionBuilder builder);
|
||||
|
||||
private BeanDefinition buildListenerContainer(Element element, ParserContext parserContext) {
|
||||
if (!element.hasAttribute("queue-names")) {
|
||||
parserContext.getReaderContext().error("If no 'listener-container' reference is provided, " +
|
||||
"the 'queue-names' attribute is required.", element);
|
||||
}
|
||||
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(
|
||||
"org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer");
|
||||
String connectionFactoryRef = element.getAttribute("connection-factory");
|
||||
|
||||
@@ -412,7 +412,7 @@
|
||||
</xsd:appinfo>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="queue-names" type="xsd:string" use="required">
|
||||
<xsd:attribute name="queue-names" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Names of the AMQP Queues from which Messages should be consumed (comma-separated list).
|
||||
|
||||
Reference in New Issue
Block a user