Option D is not ideal because using a Pub/Sub trigger to handle new messages in a topic is not the most efficient way to process messages in real time. In a trigger-based architecture, Cloud Functions are invoked only when new messages are available, so there is a possibility of delays in processing.
On the other hand, Option B provides a more efficient architecture for real-time processing. A Cloud Function is invoked for each message received in the Pub/Sub topic, providing immediate processing as messages arrive. This way, the application is independent from any other system and incurs costs only when new messages arrive, fulfilling the requirements stated in the question.