Implement pull queue logic.
Add JSON encode example.