简体   繁体   English

Spring Integration Aggregator + JDBC消息存储性能

[英]Spring Integration Aggregator + JDBC Message Store performance

The performance of aggregator to process JMS messages along with persistence message store is very low. 聚合器处理JMS消息以及持久性消息存储的性能非常低。 Like for a simple example given below the messages processed are between 25-28 msgs per second. 就像下面给出的一个简单示例一样,处理的消息每秒介于25-28 msgs之间。

Is this the normal behavior? 这是正常现象吗? Or am I doing something wrong here ? 还是我在这里做错了什么?

<!-- ###################### Inbound Message Adapter ####################### -->
<int-jms:message-driven-channel-adapter
    id="xmlInboundMessageAdapter"
    channel="msgUnmarshallingChannel"
    connection-factory="jmsConnectionFactory"
    destination="messsageQueue"
    acknowledge="transacted"
    concurrent-consumers="1"
    max-concurrent-consumers="5"
    auto-startup="true"/>

<!-- ###################### MSG UN-MARSHALLER ####################### -->   
<int:channel id="msgUnmarshallingChannel" />
<int:chain input-channel="msgUnmarshallingChannel" output-channel="msgHeaderEnricherChannel">
    <int-xml:unmarshalling-transformer unmarshaller="msgUnmarshaller" />
</int:chain>

<bean id="msgUnmarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    <property name="contextPath" value="com.msg.something" />
    <property name="supportJaxbElementClass" value="true" />
</bean>

<int:channel id="msgHeaderEnricherChannel" />

<!-- ###################### SOME HEADER ENRICHMENT ####################### -->
<int:chain input-channel="msgHeaderEnricherChannel" output-channel="msgAggreggatorChannel">
    <int:header-enricher>
        <int:header name="CORRELATION_ID" expression="payload.notificationTypeId" />
    </int:header-enricher>
</int:chain>

<int:channel id="msgAggreggatorChannel" />
<int:channel id="msgAggreggatorDiscardChannel" />

<!-- ###################### AGGREGATOR WITH PERSISTENCE MSG STORE ####################### -->   
<int:aggregator
    auto-startup="true"
    send-timeout="-1"
    message-store="messageStore"
    input-channel="msgAggreggatorChannel"
    output-channel="nullChannel"
    discard-channel="msgAggreggatorDiscardChannel"
    correlation-strategy="msgCorrelationStrategy"
    release-strategy="msgReleaseStrategy"
    expire-groups-upon-completion="true" />

<!-- ###################### MSG STORE ####################### -->   
<bean id="messageStore" class="org.springframework.integration.jdbc.JdbcMessageStore">
    <property name="dataSource" ref="dataSourceSPJDBC" />
    <property name="lobHandler" ref="oracleLobHandler" />
</bean>

<bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler" />

<bean id="msgCorrelationStrategy"   class="org.springframework.integration.aggregator.HeaderAttributeCorrelationStrategy">
    <constructor-arg value="CORRELATION_ID" />
</bean>

<bean id="msgReleaseStrategy" class="org.springframework.integration.aggregator.MessageCountReleaseStrategy">
    <constructor-arg value="10"/>
</bean>

It's a known problem for very large groups. 对于很大的群体来说,这是一个已知的问题。

Which version of Spring Integration are you using? 您正在使用哪个版本的Spring Integration? There have been a number of improvements made in this area, the latest being in 4.2. 在此方面已进行了许多改进,最新的改进是在4.2中。

The current version is 4.2.4; 当前版本是4.2.4; let us know if you're still seeing problems with that version. 如果您仍然看到该版本的问题,请告诉我们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM