One idea is to build a top-level service on boot that assembles middleware during init and then just call it.