Hi Aldrin Piri,

I did try to use Replace Text processor to remove the body of the message,
the problem is that the way the flow needs to be structure is that after
sending a 200 positive response from the HandleHTTPResponse processor to the
client, the content of the message needs to be routed to different kafka
topics. The problem is that this routing to kafka needs to be done only if
the message gave a 200 response, else the message needs to terminate there
because it gave a bad response and the client needs to resend the message.
Because of this procedure the body of the message is needed for processing
purposes after giving the 200 response, I am just looking for a way to keep
the content of the message but only send to the client the response without
that content. I tried sending the content to both our HandleHTTPResponse
processor and to a MergeContent processor and then trigger the MergeContent
processor after the content was removed from the body of the message using
the ReplaceText processor and then send the response, and if the response
was successful then trigger the MergeContent processor, however this is
still not working as well as I need it. Because of this I suggested the
addition of a new configuration in the HandleHTTPResponse processor, in
order to have an option that allows to choose if you want the response to be
sent with the content of the message or without it, without affecting the
content of the message in the flowfile itself so that it can be used
directly in the rest of the flow for other purposes without the hassle of
adding a bunch of different processors to the flow. Because the problem I
currently have with using the MergeContent to wait for the 200 response is
that even with only choosing the merged option and terminating the
relationship on original and failure, it is also sending the empty content
files of the HandleHTTPResponse processor throughout the flow along with the
actual merged ones. I need a way to only send the 200 response to the client
without the content but keep the content of the message to send to kafka,
but only do this if the HandleHTTPResponse processor sends a 200 response,
else the flow needs to terminate there.



--
View this message in context: 
http://apache-nifi-developer-list.39713.n7.nabble.com/Configuration-Suggestion-for-NiFi-HandleHTTPResponse-Processor-tp14933p14946.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Reply via email to