An Unmanned Aerial Vehicle is a non-piloted airplane designed to operate in dangerous and repetitive situations. With the advent of UAV's civil applications, UAVs are emerging as a valid option in commercial scenarios. If it must be economically viable, the same platform should implement a variety of missions with little reconfiguration time and overhead.This paper presents a middleware-based architecture specially suited to operate as a flexible payload and mission controller in a UAV. The system is composed of low-cost computing devices connected by network. The functionality is divided into reusable services distributed over a number of nodes with a middleware managing their lifecycle and communication. Some research has been done in this area; yet it is mainly focused on the control domain and in its realtime operation. Our proposal differs in that we address the implementation of adaptable and reconfigurable unmanned missions in low-cost and low-resources hardware.