pubsub: Add batch interfaces.

Pub/Sub API added batch interfaces to the current version. I'd like to
add batch interfaces to this library.