[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-11 (世界標準時間)。"],[],[],null,["# Choosing Pub/Sub or Cloud Tasks\n\nBoth [Cloud Tasks](/tasks/docs/dual-overview) and\n[Pub/Sub](/pubsub/docs/overview) can be used to\nimplement message passing and asynchronous integration. Although they\nare conceptually similar, each is designed for different set of use cases.\nThis page helps you choose the right product for your use case.\n\nKey Differences\n---------------\n\nThe core difference between Pub/Sub and Cloud Tasks is\nin the notion of implicit vs. explicit invocation.\n\nPub/Sub aims to decouple publishers of events and subscribers to those\nevents. Publishers do not need to know anything about their subscribers.\nTherefore, Pub/Sub gives publishers no control over the delivery of the\nmessages save for the guarantee of delivery. In this way, Pub/Sub\nsupports **implicit** invocation: a publisher implicitly causes the subscribers\nto execute by publishing an event.\n\nBy contrast, Cloud Tasks is aimed at **explicit** invocation where\nthe publisher retains full control of execution. In particular, a publisher\nspecifies an endpoint where each message is to be delivered.\n\nOverall Cloud Tasks are appropriate for use cases where\na task producer needs to defer or control the execution timing of a specific\nwebhook or remote procedure call. Pub/Sub is optimal for more general\nevent data ingestion and distribution patterns where some degree of\ncontrol over execution can be sacrificed.\n\nDetailed feature comparison\n---------------------------"]]