Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

SSE Client in Apache NiFi

New Contributor

I was looking for a server sent event (SSE) client in Apache NiFi, however, I couldn't find any ready processor that can do that. 


I started implementing an SSE client using Python script and used ExecuteCommand processor to run this script. However, the script needs to be terminated in order to send the processor output to the next step through STDOUT. (ie. I can't use an infinite Loop "While True:" to listen to the SSE server and output the consumed events on stream).


Is there any ideas to implement the SSE client in NiFi such that consumed events are processed one by one to the next processors in real-time?


Cloudera Employee

you can technically run an infinite loop with python and just produce a print statement.  this will send out data.  

Expert Contributor

@mmaher22 You may want to run the python job inside of ExecuteScript.   In this manner, you can send output to a flowfile during your loops iterations with:



This command is inferred at the end of the code execution in ExecuteScript to send output to next processor (1 flow file).  So if you just put that in line with your loop, then the script will run, and send flowfiles for every instance.


For a full rundown of how to use ExecuteScript be sure to see these great articles:

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.