저는 Spring Integration 3.0.1을 사용하고 있습니다. 잠시 후 jdbc 폴러가 메시지를받지 않게되었습니다. 연결이 더 이상 어떤 이유로 반환되지 않는 시점이 나타납니다. 이 문제가 발생하면 jdbc 메시지 저장소 쿼리에서 돌아 오는 SQL 형식의 알 수없는 메시지가 나타납니다.
: 첨부 는스프링 통합 : jdbc 연결이 반환되지 않았습니다.
2014-07-07 12:35:55,561 [pool-5-thread-1] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
2014-07-07 12:35:55,561 [pool-5-thread-1] DEBUG org.springframework.integration.jdbc.JdbcMessageStore - Marking messages with group key=8bdcf55e-a76a-392a-82f6-c7a956fcc572
2014-07-07 12:35:55,577 [task-scheduler-6] DEBUG org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
2014-07-07 12:35:55,577 [task-scheduler-6] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
2014-07-07 12:35:55,577 [task-scheduler-6] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [UPDATE INT_MESSAGE_GROUP set UPDATED_DATE=? where GROUP_KEY=? and REGION=?]
2014-07-07 12:35:55,577 [task-scheduler-6] DEBUG org.springframework.integration.jdbc.JdbcMessageStore - Updating MessageGroup: 2051f38d-526b-3092-a156-c3d72a975f7a
2014-07-07 12:35:55,577 [task-scheduler-10] DEBUG org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
2014-07-07 12:35:55,577 [task-scheduler-10] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL update
2014-07-07 12:35:55,577 [task-scheduler-10] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [INSERT into INT_GROUP_TO_MESSAGE(GROUP_KEY, MESSAGE_ID, REGION) values (?, ?, ?)]
2014-07-07 12:35:55,577 [task-scheduler-10] DEBUG org.springframework.integration.jdbc.JdbcMessageStore - Inserting message with id key=2e18bceb-db1b-c69b-cf59-eeffc211f597 and created date=2014-07-07 12:35:50.986
2014-07-07 12:35:55,592 [pool-5-thread-1] DEBUG org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
2014-07-07 12:35:55,592 [pool-5-thread-1] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Returning JDBC Connection to DataSource
2014-07-07 12:35:55,592 [pool-5-thread-1] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
2014-07-07 12:35:55,592 [pool-5-thread-1] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [SELECT MESSAGE_ID, MESSAGE_BYTES, CREATED_DATE from INT_MESSAGE where MESSAGE_ID in (SELECT MESSAGE_ID from INT_GROUP_TO_MESSAGE where GROUP_KEY = ?) and REGION=? ORDER BY CREATED_DATE]
2014-07-07 12:35:55,592 [pool-5-thread-1] DEBUG org.springframework.jdbc.datasource.DataSourceUtils - Fetching JDBC Connection from DataSource
2014-07-07 12:35:55,592 [pool-5-thread-1] TRACE org.springframework.jdbc.core.StatementCreatorUtils - Setting SQL statement parameter value: column index 1, parameter value [ac032a8d-08c6-362e-a874-453e6431c3ea], value class [java.lang.String], SQL type unknown
2014-07-07 12:35:55,592 [pool-5-thread-1] TRACE org.springframework.jdbc.core.StatementCreatorUtils - Setting SQL statement parameter value: column index 2, parameter value [DEFAULT], value class [java.lang.String], SQL type unknown
2014-07-07 12:35:55,608 [task-scheduler-6] DEBUG org.springframework.jdbc.core.JdbcTemplate - SQL update affected 1 rows
2014-07-07 12:35:55,608 [task-scheduler-6] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL query
2014-07-07 12:35:55,608 [task-scheduler-6] DEBUG org.springframework.jdbc.core.JdbcTemplate - Executing prepared SQL statement [SELECT MESSAGE_ID, MESSAGE_BYTES, CREATED_DATE from INT_MESSAGE where MESSAGE_ID in (SELECT MESSAGE_ID from INT_GROUP_TO_MESSAGE where GROUP_KEY = ?) and REGION=? ORDER BY CREATED_DATE]
2014-07-07 12:35:55,608 [task-scheduler-6] TRACE org.springframework.jdbc.core.StatementCreatorUtils - Setting SQL statement parameter value: column index 1, parameter value [2051f38d-526b-3092-a156-c3d72a975f7a], value class [java.lang.String], SQL type unknown
2014-07-07 12:35:55,608 [task-scheduler-6] TRACE org.springframework.jdbc.core.StatementCreatorUtils - Setting SQL statement parameter value: column index 2, parameter value [DEFAULT], value class [java.lang.String], SQL type unknown
샘플 구성 ... 로그 추출물 느릅 나무는 이후 'SQL 유형 알 수없는'로이 후에 및 계속 메시지를 가져 오기 한 후 가져 오기/반품 보여주고있다
<int-jdbc:inbound-channel-adapter id="JDBCInboundChannel" query="select * from CACHE_REPOSITORY where status='X' AND CREATION_TIME + INTERVAL '15' SECOND < SYSDATE order by CREATION_TIME"
channel="splitterInChannel" data-source="dataSource" update="update CACHE_REPOSITORY set STATUS='Y' WHERE GUID IN (:guid)" row-mapper="rowMapper"
max-rows-per-poll="10" >
<int:poller id="jdbcPoller" fixed-delay="1000" receive-timeout="5000" >
<int:transactional transaction-manager="cacheTransactionManager"/>
</int:poller>
</int-jdbc:inbound-channel-adapter>
<int:channel id="splitterInChannel" />
<int:splitter id="splitter" input-channel="splitterInChannel" output-channel="aggregatorInChannel" />
<!-- Beans to support Aggregation -->
<bean id="aggregatorBean" class="org.abc.integration.QueueItemAggregator" />
<bean id="reportTypeCorrelationStrategry" class="org.abc.integration.ReportTypeCorrelationStrategy" />
<bean id="releaseStrategry" class="org.abc.integration.ReportTypeReleaseStrategy"/>
<int:aggregator id="reportTypeAggregator" input-channel="aggregatorInChannel"
output-channel="archiveCreationChannel" 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" discard-channel="errorChannel" />
<int:channel id="archiveCreationChannel" >
<int:queue message-store="jdbc-messageStore" />
</int:channel>
<!-- Endpoint responsible for creating Archive from List of Document objects -->
<bean id="cacheArchiveCreator" class="org.abc.integration.CacheArchiveCreator"/>
<int:service-activator ref="cacheArchiveCreator" method="createArchive" input-channel="archiveCreationChannel" >
<int:poller max-messages-per-poll="1" fixed-rate="1000" error-channel="errorChannel" >
<int:transactional transaction-manager="cacheTransactionManager"/>
</int:poller>
</int:service-activator>
정말로 어디에 문제가 있는지 명확하지 않습니다. StackTrace를 제공 할 수 있습니까? "폴러는 메시지를받지 못합니다."- 메시지가 Store에 없기 때문일 수 있습니다. –
그건 문제의 큰 부분입니다. 스택 트레이스가 없습니다. org.spring.integration에 대한 TRACE가 있습니다. 설문 조사를 위해 데이터베이스에 100 개의 행을 테스트하고, 얼마나 많은 점수를 받았는지 추적합니다. 응용 프로그램을 시작할 때 해당 응용 프로그램은 레코드 폴링을 시작합니다. 폴러가 폴링을 중지하는 시점에 따라 100 개가 모두 수집되는지 여부에 따라 달라집니다. jdbc 메시지 저장소 (Aggregator, 채널 및 메시지 저장소 리퍼)를 사용하는 여러 구성 요소가 있습니다. 폴링이 중단되면 끝점에서 추가 메시지가 표시되지 않습니다. – user3802300
그래서 100 개의 모든 레코드를 폴링 할 수 있지만 엔드 포인트에서 46 개만 가져 오거나 40 개의 메시지를 폴링하여 엔드 포인트에서 더 적게 얻을 수 있습니다. – user3802300