add more support for oracle and sql server and allow server side long-polling
make sure we never ask for more messages than we have slots to run