Spring integration Spring集成-Oracle锁争用

Spring integration Spring集成-Oracle锁争用,spring-integration,Spring Integration,我们应用程序中的jdbc入站通道适配器和消息存储一致地停止查询数据,我已经能够跟踪到被阻止的Oracle会话。在Oracle中,我们得到了enq:TX-row锁争用。DBA跟踪到以下内容: SELECT COMPLETE, LAST_RELEASED_SEQUENCE, CREATED_DATE, UPDATED_DATE from INT_MESSAGE_GROUP where GROUP_KEY = :1 and REGION=:2 任何关于如何解决这一问题的建议都将不胜感激 SI配置(

我们应用程序中的jdbc入站通道适配器和消息存储一致地停止查询数据,我已经能够跟踪到被阻止的Oracle会话。在Oracle中,我们得到了enq:TX-row锁争用。DBA跟踪到以下内容:

SELECT COMPLETE, LAST_RELEASED_SEQUENCE, CREATED_DATE, UPDATED_DATE
from INT_MESSAGE_GROUP
where GROUP_KEY = :1 and REGION=:2 
任何关于如何解决这一问题的建议都将不胜感激

SI配置(摘录):


我想主要问题是
documentMessageStoreReaper
固定费率,它启动了
从INT\u MESSAGE\u组中删除
。您应该将其更改为
fixed dealy
,以避免并发任务


由于您说从INT_消息组删除的
很长,因此任务之间间隔10秒可能不够。

您显示的选择不会导致此等待事件。当两个会话更新同一行或执行
select。。。用于同一行的更新
。但是一个简单的
select
不会导致这种情况。这是我的DBA提供的查询,因为他发现了与锁相关的内容。我有另一个工具在同一个表上执行一个非常长的查询。从INT_MESSAGE_GROUP中删除,其中GROUP_KEY=:1和REGION=:2您也可以在发生争用时检查此组。。
<int-jdbc:message-store id="jdbc-messageStore" data-source="dataSource"  /> 
<int-jdbc:inbound-channel-adapter id="JDBCInboundChannel"     query="${cache.integration.jdbc.selectQuery}" 
    channel="inboundMessagesChannel" data-source="dataSource"  update="update CACHE_REPOSITORY set STATUS='P' WHERE GUID IN (:guid)" row-mapper="rowMapper" 
    max-rows-per-poll="${cache.integration.jdbc.maxRowsPerPoll}" auto-startup="false" >
    <int:poller id="jdbcPoller" fixed-delay="${cache.integration.jdbc.fixedDelay}"   >
        <int:transactional />
    </int:poller>
</int-jdbc:inbound-channel-adapter>
<int:chain...>
<int:aggregator id="reportTypeAggregator" ref="aggregatorBean" method="collect"
         message-store="jdbc-messageStore" release-strategy="releaseStrategry"  
        release-strategy-method="canRelease" correlation-strategy="reportTypeCorrelationStrategry"
        correlation-strategy-method="correlate" send-partial-result-on-expiry="true"
        expire-groups-upon-completion="true" empty-group-min-timeout="30000" />
</int:chain>        
<bean id="queryProvider" class="org.springframework.integration.jdbc.store.channel.OracleChannelMessageStoreQueryProvider"/>     
 <bean id="jdbc-channel-messageStore" class="org.springframework.integration.jdbc.store.JdbcChannelMessageStore">
    <property name="dataSource" ref="dataSource"/>   
    <property name="channelMessageStoreQueryProvider" ref="queryProvider"/>
    <property name="region" value="${cache.integration.channelMessageStore.region}"/>

</bean>     

<int:channel id="archiveCreationChannel" >  
    <int:queue  message-store="jdbc-channel-messageStore" />
    <int:interceptors>
        <int:wire-tap channel="logger" timeout="-1"/>
    </int:interceptors>
</int:channel>

<bean id="documentMessageStoreReaper" class="org.springframework.integration.store.MessageGroupStoreReaper">
    <property name="messageGroupStore" ref="jdbc-messageStore" />
    <property name="timeout" value="${cache.integration.reaper.timeout}" />
    <property name="autoStartup" value="false" />
</bean>

<task:scheduled-tasks>
    <task:scheduled ref="documentMessageStoreReaper" method="run" fixed-rate="10000" />
</task:scheduled-tasks>