allow produce and consume to pass values in both directions. closes #4775