If you buy a futures contract, you are required to accept delivery of some fixed amount. You don't have to take "all the oil party B produces", just what you agreed to ahead of time. This protects you from upward price trends, and the producer from downward price trends.