The success of the Internet of Things (IoT) has driven the development, among others, of many different software architectures for producing, processing, and analyzing heterogeneous data. In many cases, IoT applications share common features, such as the use of a platform or middleware, also known as message broker, that collects and manages data traffic between endpoints. However, in general, data processing is very dependent on the case study (sensors that send temperature data, drones that send images, etc.). Thus, the applications responsible for receiving and processing data, which we call consumers, have to be built ad hoc, since some of their elements have to be specially configured to solve specific needs of the case study. This paper presents FLEXTORY, a software factory tool to make it easier for IoT developers to automatically construct configurable consumer applications, which we call FLEX-consumers. FLEXTORY guides developers through the process of generating Java consumers by selecting some desired features such as, for instance, the particular communication protocol to be used. This way, the developer only has to concentrate on designing the algorithm to process the data. In short, the use of FLEXTORY will result in consumer applications with configurable behavior, namely FLEX-consumers, that can connect to a messaging server (for example RabbitMQ) and process the received messages.