Package com.iohao.net.extension.domain
package com.iohao.net.extension.domain
Provides domain-event infrastructure based on Disruptor for implementing asynchronous event-driven
workflows, similar in spirit to Guava EventBus or Spring `ApplicationEvent`.
See domain-event for module usage and integration guidance. Disruptor is an open-source concurrent framework. It is a high-performance queue developed by the British foreign exchange trading company LMAX, which greatly simplifies the difficulty of concurrent program development and won the 2011 Duke’s Program Framework Innovation Award. Disruptor can be understood as a single-machine version of MQ (the lightest and fastest single-machine MQ -- disruptor).
Advantages of Event Source Domain Events
1. Domain-Driven Design, based on LMAX architecture. 2. Single Responsibility Principle, which can achieve the ultimate in system extensibility, high scalability, and low coupling. 3. Asynchronous high concurrency and thread-safe, using disruptor ring buffer to consume business. 4. Writing code using event consumption methods, even if the business is complex, the code will not become messy, and the cost of code maintenance is lower. 5. Flexible customization of business thread models 6. Event domain provided in plugin form, achieving plug-and-play, as interesting as playing Lego bricks.
- Author:
- 渔民小镇
- date:
- 2021-12-26
-
ClassDescriptionEvent subscription sends
CommonEventtoRingBufferPublishes domain events into the configured disruptor pipeline.Interface for building DisruptorResponsible for managing the DisruptorBoots and manages the lifecycle of domain-event disruptor pipelines.Interface for domain event consumption, receives a domain eventStatic facade for publishing domain events through the configured producer.Configuration holder for domain-event disruptor creation and handler registration.Domain event interface - source event sourceBusiness interface for domain events (Event Object)Domain message topic