One of the main advantages brought by the Internet of Things (IoT) is the possibility of having large amounts of data from several sources that allow us, once analyzed, to make decisions in various domains in real time. This implies the need to be able to process large volumes of data in more or less limited processing times depending on the application domain. In this sense, complex event processing (CEP), used in conjunction with an enterprise service bus (ESB), has proven to be very efficient in multiple domains. In search for greater efficiency, some CEP engines offer the option of using flow-based programming (FBP) rather than their traditional programming using CEP together with an event bus. However, its use, while it may be more efficient, can lead to other limitations. In this article, we analyze and describe the performance and limitations of using a CEP engine with an ESB versus a CEP engine with FBP. This will allow developers to decide which option is more convenient for their IoT system depending on the application domain and its specific needs.Index Terms-Complex event processing (CEP), dataflow, dataflow computing, enterprise service bus (ESB), flow-based programming (FBP), Internet of Things (IoT).