private boolean delivered = false; @Inject private transient CommandGateway commandGateway; @StartSaga @SagaEventHandler(associationProperty = "orderId") public void handle(OrderCreatedEvent event) { // client generated identifiers ShippingId shipmentId = createShipmentId(); InvoiceId invoiceId = createInvoiceId(); // associate the Saga with these values, before sending the commands SagaLifecycle.associateWith("shipmentId", shipmentId); SagaLifecycle.associateWith("invoiceId", invoiceId); // send the commands commandGateway.send(new PrepareShippingCommand(...)); commandGateway.send(new CreateInvoiceCommand(...)); @SagaEventHandler(associationProperty = "shipmentId") public void handle(ShippingArrivedEvent event) { delivered = true; if (paid) { SagaLifecycle.end(); } @SagaEventHandler(associationProperty = "invoiceId") public void handle(InvoicePaidEvent event) { paid = true; if (delivered) { SagaLifecycle.end(); } // ... 方俊贤; Ken Fang
专利号: 201910652769.4; 一种深度学习的算法, 预测微服务持续发布、持续部署后对产品整体质量的影响, 获得国家知识财产局专利; 符合专利法实施细则第 44 条的规定。
[email protected] https://www.deva9.com

Average Rating

关于我

方俊贤; Ken Fang; A9 Atlas 工作室; @deva9ken ; [email protected]

专利号: 201910652769.4 ; 一种深度学习的算法, 预测微服务持续发布、持续部署后对产品整体质量的影响, 获得国家知识财产局专利; 符合专利法实施细则第 44 条的规定。

主要专长: 运用深度学习, 预测微服务发布或部署后的质量, 以提升微服务开发的效率与质量。微服务架构设计与开发。探索性测试。有价值的产品特性挖掘。使用者行为 (场景) 分析。领域驱动设计。

曾任职于: 腾讯科技 (深圳) 有限公司 软件开发过程改进专家; 雅各布森软件 (北京) 有限公司 首席谘询顾问; Rational 资深谘询顾问。

有二十多年半导体、 电信产业、军事研究单位与互联网的产品研发与咨询服务等的经验。

于 Illinois Institute of Technology, Chicago, USA 获得电子计算机科学硕士。

通过电子邮件订阅博客

输入您的电子邮件地址订阅此博客,并通过电子邮件接收博客更新通知。

电子邮件地址

热门主题

掌握了深度学习 (Deep Learning), 就能从人工智能的产品中获利, 拥有高度的用户忠诚度吗? 恐怕会事与愿违的 ?! 我们真的需要抛弃 C/C++, Java, Golang, 去拥抱 Rust 吗 ?! Rust 如何实现连接池与测试隔离? 中台; 是英雄? 是悲剧? 解决之道又是什么? 人工智能算法的末日来了, 为何 ?!