title: What to use i.e Message Filter or Header Value router while propagating messages based on a header value?
body: <p>In our spring integration project we have to propagate message further down the flow only if we received a success value from a third party api.</p>
  
  <p>Currently i am setting the header value to </p>
  
  <blockquote>
    <p>success</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>fail</p>
  </blockquote>
  
  <p>based on whether we received the expected response or not and then routing the message to success or failure channel respectively.</p>
  
  <p><strong><em>I can also achieve the same flow by using a message filter but was wondering if that would be the correct approach?</em></strong></p>
  
  <p><strong><em>httpInboundAdapter->initiateChannel->messageProcessor (Service activator)-> filterChannel->headerValueRouter->responseChannel->response</em></strong></p>
  
  <p>Below is the integration graph for the same:</p>
  
  <p><a href="https://i.stack.imgur.com/iYAR5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iYAR5.jpg" alt="enter image description here"></a></p>