Add metadata lookup to streaming backend.

Fixes #540