Added the following MessageListener container configuration attributes to the jms-gateway element: concurrent-consumers, max-concurrent-consumers, max-messages-per-task, and idle-task-execution-limit (INT-313).
This commit is contained in:
@@ -96,6 +96,10 @@
|
||||
<xsd:attribute name="request-timeout" type="xsd:long"/>
|
||||
<xsd:attribute name="reply-timeout" type="xsd:long"/>
|
||||
<xsd:attribute name="transaction-manager" type="xsd:string"/>
|
||||
<xsd:attribute name="concurrent-consumers" type="xsd:string"/>
|
||||
<xsd:attribute name="max-concurrent-consumers" type="xsd:string"/>
|
||||
<xsd:attribute name="max-messages-per-task" type="xsd:string"/>
|
||||
<xsd:attribute name="idle-task-execution-limit" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
@@ -110,6 +110,22 @@ public class JmsGateway extends SimpleMessagingGateway implements Lifecycle, Dis
|
||||
this.expectReply = expectReply;
|
||||
}
|
||||
|
||||
public void setConcurrentConsumers(int concurrentConsumers) {
|
||||
this.concurrentConsumers = concurrentConsumers;
|
||||
}
|
||||
|
||||
public void setMaxConcurrentConsumers(int maxConcurrentConsumers) {
|
||||
this.maxConcurrentConsumers = maxConcurrentConsumers;
|
||||
}
|
||||
|
||||
public void setMaxMessagesPerTask(int maxMessagesPerTask) {
|
||||
this.maxMessagesPerTask = maxMessagesPerTask;
|
||||
}
|
||||
|
||||
public void setIdleTaskExecutionLimit(int idleTaskExecutionLimit) {
|
||||
this.idleTaskExecutionLimit = idleTaskExecutionLimit;
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
if (this.container == null) {
|
||||
this.container = createDefaultContainer();
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.integration.adapter.jms.JmsGateway;
|
||||
import org.springframework.integration.config.IntegrationNamespaceUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -109,6 +110,10 @@ public class JmsGatewayParser extends AbstractSingleBeanDefinitionParser {
|
||||
if ("true".equals(element.getAttribute("expect-reply"))) {
|
||||
builder.addPropertyValue("expectReply", Boolean.TRUE);
|
||||
}
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "concurrent-consumers");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "max-concurrent-consumers");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "max-messages-per-task");
|
||||
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "idle-task-execution-limit");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user