我尝试使用int:poller处理错误,我在调用ErrorHandler时发生错误时在轮询器上定义了一个错误通道,但它仍然在循环中执行 阻止处理下一个正确消息的主要进程。 这是我的配置任何想法?
<int:outbound-channel-adapter ref="cvsMessageHandler" method="handleMessage" channel="cvsInputChannel"/>
<int:poller max-messages-per-poll="1" id="defaultPoller" default="true" fixed-rate="5000"
error-channel="cvsErrorChannel">
<int:transactional transaction-manager="transactionManager" />
</int:poller>
<bean id="cvsMessageHandler" class="com.cvs.ws.wrapper.MessageHandler">
</bean>
<int:channel id="cvsErrorChannel"/>
<bean id="cvsErrorMessageHandler" class="com.eplatform.transverse.cvs.ws.service.ErrorHandler">
<property name="eventService" ref="cvsEventService"/>
<property name="eventFactory" ref="cvsEventFactory"/>
</bean>
<int:chain input-channel="cvsErrorChannel">
<int:service-activator ref="cvsErrorMessageHandler" method="handleMessage"/>
</int:chain>
<stream:stderr-channel-adapter channel="errorChannel" append-newline="true"/>
<int:channel id="csdbInputChannel">
<int:queue message-store="messageStore"/>
</int:channel>
<bean id="csdbService" class="com.renault.eplatform.transverse.datapower.csdb.ws.service.CsdbService">
<property name="channel" ref="csdbInputChannel"/>
</bean>
<bean id="csdbWrapper" class="com.renault.eplatform.transverse.datapower.csdb.ws.wrapper.CsdbWrapper">
<property name="httpClient">
<bean class="com.fullsix.framework.net.http.HttpClientFactoryBean"/>
</property>
<property name="url" value="${www}"/>
<property name="enumCountry" ref="currentCountry"/>
<property name="datapowerLoggingService" ref="dxxx"/>
<property name="password" value="${dwwww}"/>
<property name="socketTimeout" value="20000"/>
<property name="timeout" value="20000"/>
</bean>
201803-08 15:34:55,546 ERROR [ErrorHandler.java:28] - 尝试修复数据 表DATAPOWER_CSDB_MESSAGE_GROUP和DATAPOWER_CSDB_MESSAGE
201803-08 15:34:55,547 DEBUG [AbstractReplyProducingMessageHandler.java:107] - 处理程序&#39; ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@4cc7014c]&#39; 没有回复请求消息: [有效载荷=显示java.lang.NullPointerException] [接头= {时间戳= 1520519695543, ID = b71d066b-a8e5-4fa3-8b87-a8c1d9e57587}] 201803-08 15:34:55,547 DEBUG [AbstractMessageChannel.java:237] - postSend(sent = true)on 频道&#39; csdbErrorChannel&#39;,消息: [有效载荷=显示java.lang.NullPointerException] [接头= {时间戳= 1520519695543, ID = b71d066b-a8e5-4fa3-8b87-a8c1d9e57587}] 201803-08 15:35:00,515 DEBUG [AbstractPlatformTransactionManager.java:365] - 创建新的 具有名称的交易 201803-08 15:35:00,516 DEBUG [SessionImpl.java:265] - 时间戳开放时间:15205197005
201803-08 15:35:00,517 DEBUG [HibernateTransactionManager.java:493] - 打开新的Session [org.hibernate.impl.SessionImpl@7e350225] Hibernate事务 201803-08 15:35:00,517 DEBUG [HibernateTransactionManager.java:504] - 准备JDBC连接 Hibernate Session [org.hibernate.impl.SessionImpl@7e350225] 201803-08 15:35:00,517 DEBUG [JDBCTransaction.java:78] - 开始 201803-08 15:35:00,518 DEBUG [ConnectionManager.java:444] - 打开JDBC 连接 201803-08 15:35:00,518 DEBUG [JDBCTransaction.java:83] - 当前自动提交状态:true 201803-08 15:35:00,519 DEBUG [JDBCTransaction.java:86] - 禁用自动提交 201803-08 15:35:00,519 DEBUG [HibernateTransactionManager.java:569] - 公开 Hibernate事务作为JDBC事务 [jdbc:oracle:thin:@ // active-db-valid:1521 / rsite,UserName = RSITE_ES, Oracle JDBC驱动程序] 201803-08 15:35:00,520 DEBUG [JdbcTemplate.java:635] - 执行准备好的SQL查询 201803-08 15:35:00,520 DEBUG [JdbcTemplate.java:570] - 执行准备好的SQL 语句[来自DATAPOWER_CSDB_MESSAGE_GROUP的SELECT COUNT(MESSAGE_ID) GROUP_KEY =? AND REGION =?] 201803-08 15:35:00,523 DEBUG [JdbcTemplate.java:635] - 执行准备好的SQL查询 201803-08 15:35:00,523 DEBUG [JdbcTemplate.java:570] - 执行准备好的SQL 声明[SELECT MESSAGE_ID,CREATED_DATE from DATAPOWER_CSDB_MESSAGE_GROUP其中GROUP_KEY =?和REGION =?订购 UPDATED_DATE] 201803-08 15:35:00,525 DEBUG [JdbcTemplate.java:635] - 执行准备好的SQL查询 201803-08 15:35:00,526 DEBUG [JdbcTemplate.java:570] - 执行准备好的SQL语句[SELECT 来自DATAPOWER_CSDB_MESSAGE的MESSAGE_ID,CREATED_DATE,MESSAGE_BYTES MESSAGE_ID =?和REGION =?] 201803-08 15:35:00,528 DEBUG [DefaultLobHandler.java:117] - 将BLOB作为字节返回 201803-08 15:35:00,529 DEBUG [AbstractPlatformTransactionManager.java:843] - 启动事务回滚 201803-08 15:35:00,529 DEBUG [HibernateTransactionManager.java:672] - 回滚Hibernate 会话事务[org.hibernate.impl.SessionImpl@7e350225]
201803-08 15:35:00,530 DEBUG [JDBCTransaction.java:182] - 回滚
201803-08 15:35:00,531 DEBUG [JDBCTransaction.java:223] - 重新启用 自动提交 201803-08 15:35:00,531 DEBUG [JDBCTransaction.java:193] - 回滚JDBC连接 201803-08 15:35:00,531 DEBUG [ConnectionManager.java:325] - 与会话完成的事务 on_close连接释放模式;一定要关闭会话 发布JDBC资源! 201803-08 15:35:00,532 DEBUG [HibernateTransactionManager.java:734] - 关闭Hibernate会话 交易后[org.hibernate.impl.SessionImpl@7e350225] 201803-08 15:35:00,532 DEBUG [SessionFactoryUtils.java:800] - 关闭Hibernate 会议 201803-08 15:35:00,533 DEBUG [ConnectionManager.java:464] - 释放JDBC连接[(打开PreparedStatements:0,全局:0) (打开ResultSet:0,全局:0)] 201803-08 15:35:00,533调试 [ConnectionManager.java:325] - 与会话完成的事务 on_close连接释放模式;一定要关闭会话 发布JDBC资源! 201803-08 15:35:00,534 DEBUG [AbstractMessageChannel.java:224] - 在频道上预发送 &#39; csdbErrorChannel&#39;,消息: [有效载荷=显示java.lang.NullPointerException] [接头= {时间戳= 1520519700534, ID = fe974a6c-2351-4b95-ac6f-b98a0c02a7b3}] 201803-08 15:35:00,534 DEBUG [AbstractMessageHandler.java:67] - 收到org.springframework.integration.handler.MessageHandlerChain#0 信息: [有效载荷=显示java.lang.NullPointerException] [接头= {时间戳= 1520519700534, ID = fe974a6c-2351-4b95-ac6f-b98a0c02a7b3}] 201803-08 15:35:00,535 DEBUG [AbstractMessageHandler.java:67] - ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@4cc7014c] 收到的消息: [有效载荷=显示java.lang.NullPointerException] [接头= {时间戳= 1520519700534, ID = fe974a6c-2351-4b95-ac6f-b98a0c02a7b3}] 201803-08 15:35:00,535 INFO [ErrorHandler.java:25] - 处理错误消息 201803-08 15:35:00,536 ERROR [ErrorHandler.java:27] - 显示java.lang.NullPointerException 201803-08 15:35:00,536错误 [ErrorHandler.java:28] - 尝试修复表格上的数据 DATAPOWER_CSDB_MESSAGE_GROUP和DATAPOWER_CSDB_MESSAGE *
*