splitter uses internal queues
marshaling key and value in mapper so that types are preserved