如何使用 Amazon EventBridge 存檔和重播事件

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"事件驅動型架構使用事件在一個或多個應用程序的組件之間共享信息。事件告訴我們“發生了什麼事情”,可能是您收到了 API 請求、文件已上傳到存儲平臺或數據庫記錄已更新。業務事件描述了與您的活動相關的內容,例如已創建新客戶賬戶或付款已成功。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"要使用您自己的應用程序、集成的軟件即服務 (SaaS) 應用程序和 AWS 服務中的事件將應用程序連接在一起,您可以使用 "},{"type":"link","attrs":{"href":"https:\/\/amazonaws-china.com\/eventbridge","title":"","type":null},"content":[{"type":"text","text":"Amazon EventBridge"}]},{"type":"text","text":",它是一個無服務器事件總線,可從事件源中交付實時數據流,然後將該數據路由到 "},{"type":"link","attrs":{"href":"https:\/\/amazonaws-china.com\/lambda\/","title":"","type":null},"content":[{"type":"text","text":"AWS Lambda"}]},{"type":"text","text":" 之類的目標中。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"事件告訴我們,可以與對該信息感興趣的任何人共享信息。創建新的客戶賬戶後,新添加的服務可以使用此信息,而無需更改現有界面。例如,新的欺詐檢測系統可以瞭解爲執行安全檢查和評估可能的欺詐活動而創建的所有新客戶賬戶。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"有時候您可能需要 "},{"type":"text","marks":[{"type":"strong"}],"text":"重新處理"},{"type":"text","text":" 過去的事件。在很多使用案例中,重新處理很有用,例如:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"修復錯誤後,您可以重新處理受影響的事件以獲得正確的結果。此方法假定您的應用程序可以多次處理同一事件。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"發佈新功能時,您可以重新處理之前的事件,以將該功能的覆蓋範圍擴展到過去的數據。例如,添加到您的應用程序中的欺詐檢測系統不僅可以訪問新賬戶,還可以訪問過去幾周或幾個月創建的賬戶。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"爲了使其操作更方便,我很高興地分享一個消息,EventBridge 現在可以存檔和重播事件:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,您可以爲發佈到事件總線的事件創建加密 "},{"type":"text","marks":[{"type":"strong"}],"text":"存檔"},{"type":"text","text":" 。您可以存檔所有事件或使用 "},{"type":"link","attrs":{"href":"https:\/\/docs.aws.amazon.com\/eventbridge\/latest\/userguide\/what-is-amazon-eventbridge.html","title":"","type":null},"content":[{"type":"text","text":"EventBridge 規則"}]},{"type":"text","text":"所用的"},{"type":"link","attrs":{"href":"https:\/\/docs.aws.amazon.com\/eventbridge\/latest\/userguide\/filtering-examples-structure.html","title":"","type":null},"content":[{"type":"text","text":"模式匹配語法"}]},{"type":"text","text":"對事件進行篩選。您可以無限期地存儲事件,也可以設置 "},{"type":"text","marks":[{"type":"strong"}],"text":"保留期"},{"type":"text","text":" ,在保留期之後,舊事件將自動從存檔中刪除。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"您還可以 "},{"type":"text","marks":[{"type":"strong"}],"text":"重播"},{"type":"text","text":" 存儲在檔案中的事件。事件將根據爲事件總線定義的所有規則(但不是其他 AWS 服務所創建的"},{"type":"link","attrs":{"href":"https:\/\/docs.aws.amazon.com\/eventbridge\/latest\/userguide\/eventbridge-managed-rules.html","title":"","type":null},"content":[{"type":"text","text":"託管規則"}]},{"type":"text","text":")或您指定的規則重播。重播的事件包含一個額外的 "},{"type":"codeinline","content":[{"type":"text","text":"replay-name"}]},{"type":"text","text":" 字段,以防您需要識別它們。開始重播時,您需要定義一個時間範圍,並且只重播該時間範圍內的事件。目前,您只能在存檔事件的事件總線中重播事件。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"可以對 EventBridge 的所有事件流程進行存檔和重播,包括來自 AWS 平臺、"},{"type":"link","attrs":{"href":"https:\/\/amazonaws-china.com\/eventbridge\/integrations\/","title":"","type":null},"content":[{"type":"text","text":"SaaS 集成"}]},{"type":"text","text":"的事件以及您自己的自定義事件。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章