Производительность Spring Integration Aggregator + JDBC Message Store

Производительность агрегатора для обработки сообщений JMS вместе с хранилищем сообщений постоянства очень низкая. Как и в простом примере, приведенном ниже, обрабатываемые сообщения составляют от 25 до 28 сообщений в секунду.

Это нормальное поведение? Или я что-то не так здесь делаю?

<!-- ###################### 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>

person GUMMY    schedule 30.12.2015    source источник


Ответы (1)


Это известная проблема для очень больших групп.

Какую версию Spring Integration вы используете? В этой области был сделан ряд улучшений, последнее из которых было в версии 4.2.

Текущая версия 4.2.4; дайте нам знать, если вы все еще видите проблемы с этой версией.

person Gary Russell    schedule 30.12.2015