title: Spring integration chain error block process
body: <p>I'm trying to handle errors using the int:poller, I defined an error-channel on the poller  when an error occurs the ErrorHandler invoked, but it still executed in a loop and 
  block the principal process that handle the next correct message.
  Here's my config any ideas?</p>
  
  <pre><code>&lt;int:outbound-channel-adapter ref="cvsMessageHandler" method="handleMessage" channel="cvsInputChannel"/&gt;
  &lt;int:poller max-messages-per-poll="1" id="defaultPoller" default="true" fixed-rate="5000"
              error-channel="cvsErrorChannel"&gt;
      &lt;int:transactional transaction-manager="transactionManager" /&gt;
  &lt;/int:poller&gt;
  
  &lt;bean id="cvsMessageHandler" class="com.cvs.ws.wrapper.MessageHandler"&gt;
  &lt;/bean&gt;
  
  
  &lt;int:channel id="cvsErrorChannel"/&gt;
  
  &lt;bean id="cvsErrorMessageHandler" class="com.eplatform.transverse.cvs.ws.service.ErrorHandler"&gt;
      &lt;property name="eventService" ref="cvsEventService"/&gt;
      &lt;property name="eventFactory" ref="cvsEventFactory"/&gt;
  &lt;/bean&gt;
  
  &lt;int:chain input-channel="cvsErrorChannel"&gt;
      &lt;int:service-activator ref="cvsErrorMessageHandler" method="handleMessage"/&gt;
  &lt;/int:chain&gt;
  
  &lt;stream:stderr-channel-adapter channel="errorChannel" append-newline="true"/&gt;
  </code></pre>
  
  <hr>
  
  <p></p>
  
  <pre><code>&lt;int:channel id="csdbInputChannel"&gt;
      &lt;int:queue message-store="messageStore"/&gt;
  &lt;/int:channel&gt;
  
  &lt;bean id="csdbService" class="com.renault.eplatform.transverse.datapower.csdb.ws.service.CsdbService"&gt;
      &lt;property name="channel" ref="csdbInputChannel"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="csdbWrapper" class="com.renault.eplatform.transverse.datapower.csdb.ws.wrapper.CsdbWrapper"&gt;
      &lt;property name="httpClient"&gt;
          &lt;bean class="com.fullsix.framework.net.http.HttpClientFactoryBean"/&gt;
      &lt;/property&gt;
      &lt;property name="url" value="${www}"/&gt;
      &lt;property name="enumCountry" ref="currentCountry"/&gt;
      &lt;property name="datapowerLoggingService" ref="dxxx"/&gt;
      &lt;property name="password" value="${dwwww}"/&gt;
      &lt;property name="socketTimeout" value="20000"/&gt;
      &lt;property name="timeout" value="20000"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <hr>
  
  <blockquote>
    <p>201803-08 15:34:55,546 ERROR [ErrorHandler.java:28] - Try to fix data
    on tables DATAPOWER_CSDB_MESSAGE_GROUP and DATAPOWER_CSDB_MESSAGE</p>
    
    <p>201803-08 15:34:55,547 DEBUG
    [AbstractReplyProducingMessageHandler.java:107]
     - handler 'ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@4cc7014c]'
    produced no reply for request Message:
    [Payload=java.lang.NullPointerException][Headers={timestamp=1520519695543,
    id=b71d066b-a8e5-4fa3-8b87-a8c1d9e57587}] 
    201803-08 15:34:55,547
    DEBUG [AbstractMessageChannel.java:237] - postSend (sent=true) on
    channel 'csdbErrorChannel', message:
    [Payload=java.lang.NullPointerException][Headers={timestamp=1520519695543,
    id=b71d066b-a8e5-4fa3-8b87-a8c1d9e57587}] 
    201803-08 15:35:00,515
    DEBUG [AbstractPlatformTransactionManager.java:365] - Creating new
    transaction with name
    201803-08 15:35:00,516 DEBUG
    [SessionImpl.java:265] - opened session at timestamp: 15205197005</p>
    
    <p>201803-08 15:35:00,517 DEBUG [HibernateTransactionManager.java:493] -
    Opened new Session [org.hibernate.impl.SessionImpl@7e350225] for
    Hibernate transaction 
    201803-08 15:35:00,517 DEBUG
    [HibernateTransactionManager.java:504] - Preparing JDBC Connection of
    Hibernate Session [org.hibernate.impl.SessionImpl@7e350225] 
    201803-08
    15:35:00,517 DEBUG [JDBCTransaction.java:78] - begin 
    201803-08
    15:35:00,518 DEBUG [ConnectionManager.java:444] - opening JDBC
    connection 
    201803-08 15:35:00,518 DEBUG [JDBCTransaction.java:83] -
    current autocommit status: true 
    201803-08 15:35:00,519 DEBUG
    [JDBCTransaction.java:86] - disabling autocommit 
    201803-08
    15:35:00,519 DEBUG [HibernateTransactionManager.java:569] - Exposing
    Hibernate transaction as JDBC transaction
    [jdbc:oracle:thin:@//active-db-valid:1521/rsite, UserName=RSITE_ES,
    Oracle JDBC driver] 
    201803-08 15:35:00,520 DEBUG
    [JdbcTemplate.java:635] - Executing prepared SQL query 
    201803-08
    15:35:00,520 DEBUG [JdbcTemplate.java:570] - Executing prepared SQL
    statement [SELECT COUNT(MESSAGE_ID) from DATAPOWER_CSDB_MESSAGE_GROUP
    where GROUP_KEY=? AND REGION=?] 
    201803-08 15:35:00,523 DEBUG
    [JdbcTemplate.java:635] - Executing prepared SQL query 
    201803-08
    15:35:00,523 DEBUG [JdbcTemplate.java:570] - Executing prepared SQL
    statement [SELECT MESSAGE_ID, CREATED_DATE from
    DATAPOWER_CSDB_MESSAGE_GROUP where GROUP_KEY=? and REGION=? order by
    UPDATED_DATE] 
    201803-08 15:35:00,525 DEBUG [JdbcTemplate.java:635] -
    Executing prepared SQL query 
    201803-08 15:35:00,526 DEBUG
    [JdbcTemplate.java:570] - Executing prepared SQL statement [SELECT
    MESSAGE_ID, CREATED_DATE, MESSAGE_BYTES from DATAPOWER_CSDB_MESSAGE
    where MESSAGE_ID=? and REGION=?] 
    201803-08 15:35:00,528 DEBUG
    [DefaultLobHandler.java:117] - Returning BLOB as bytes 
    201803-08
    15:35:00,529 DEBUG [AbstractPlatformTransactionManager.java:843] -
    Initiating transaction rollback 
    201803-08 15:35:00,529 DEBUG
    [HibernateTransactionManager.java:672] - Rolling back Hibernate
    transaction on Session [org.hibernate.impl.SessionImpl@7e350225]</p>
    
    <p>201803-08 15:35:00,530 DEBUG [JDBCTransaction.java:182] - rollback</p>
    
    <p>201803-08 15:35:00,531 DEBUG [JDBCTransaction.java:223] - re-enabling
    autocommit 
    201803-08 15:35:00,531 DEBUG [JDBCTransaction.java:193] -
    rolled back JDBC Connection 
    201803-08 15:35:00,531 DEBUG
    [ConnectionManager.java:325] - transaction completed on session with
    on_close connection release mode; be sure to close the session to
    release JDBC resources! 
    201803-08 15:35:00,532 DEBUG
    [HibernateTransactionManager.java:734] - Closing Hibernate Session
    [org.hibernate.impl.SessionImpl@7e350225] after transaction 
    201803-08
    15:35:00,532 DEBUG [SessionFactoryUtils.java:800] - Closing Hibernate
    Session 
    201803-08 15:35:00,533 DEBUG [ConnectionManager.java:464] -
    releasing JDBC connection [ (open PreparedStatements: 0, globally: 0)
    (open ResultSets: 0, globally: 0)] 
    201803-08 15:35:00,533 DEBUG
    [ConnectionManager.java:325] - transaction completed on session with
    on_close connection release mode; be sure to close the session to
    release JDBC resources! 
    201803-08 15:35:00,534 DEBUG
    [AbstractMessageChannel.java:224] - preSend on channel
    'csdbErrorChannel', message:
    [Payload=java.lang.NullPointerException][Headers={timestamp=1520519700534,
    id=fe974a6c-2351-4b95-ac6f-b98a0c02a7b3}] 
    201803-08 15:35:00,534
    DEBUG [AbstractMessageHandler.java:67] -
    org.springframework.integration.handler.MessageHandlerChain#0 received
    message:
    [Payload=java.lang.NullPointerException][Headers={timestamp=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]
    received message:
    [Payload=java.lang.NullPointerException][Headers={timestamp=1520519700534,
    id=fe974a6c-2351-4b95-ac6f-b98a0c02a7b3}] 
    201803-08 15:35:00,535 
    INFO [ErrorHandler.java:25] - Error message handled 
    201803-08
    15:35:00,536 ERROR [ErrorHandler.java:27] -
    java.lang.NullPointerException 
    201803-08 15:35:00,536 ERROR
    [ErrorHandler.java:28] - Try to fix data on tables
    DATAPOWER_CSDB_MESSAGE_GROUP and DATAPOWER_CSDB_MESSAGE*</p>
  </blockquote>
  
  <p>*</p>