build app with router that takes the app state and input channel, and when a vector of messages is processed by the router, forward the messages to the input channel for handling