this patches does multiple things:
- it ignores batching when pulling from main queue to maintain as
much ordering as possible. this avoids related messages split across
multiple batches and one batch starting much farther along than another
- it sets pipeline processing listeners to single thread. at this stage,
the pipeline queue contains less messages and therefore very likely,
thread1 and thread2 will grab related messages and race to set cache
- adds sorting to pipeline queue so if batching is enabled, we can
further ensure that messages are in order before processing.
- enables batching by default. (one thread per listener grabbing one
message at a time will be slow.)
- offers better batching for direct to db dispatcher as resources are
grouped
Change-Id: Iac5b552bae1e73f93cbfc830b1e83510b1aceb9e