The authors consider a stochastic flow system with an intermediate storate buffer. When the buffer is depleted of stock, orders from outside are placed. It is assumed that there is a risk of failure (which is referred to as obsolescence) that wipes out existing inventory, and that the time to obsolescence is exponentially distributed. The problem is to determine order quantities so as to minimize expected inventory costs when faced with obsolescence. The underlying input-output (production-demand) process is not controllable and the resulting inventory level is modeled by a Brownian motion. The authors develop an exact expression for the expected total cost until obsolescence, dependent on the order-quantity decision-variable. Numerical results which center around one specific application are examined to gain insight into the problem. The work is a generalization of recent research on the EOQ in the face of obsolescence in that it studies the influence of randomness in the inventory level process.