DamiBus v0.29 released, local multi-module decoupling framework

DamiBus is specially designed for decoupling communication between local multiple modules (especially unknown modules, isolation modules, and domain modules). Zero dependencies, especially suitable for DDD.

Features

Combining the concepts of Bus and RPC, it can be used for event distribution, interface calling, and asynchronous response.

  • Support transaction conduction (synchronous distribution, exception transparent transmission)
  • Support event identifiers and interceptors (convenient for tracking)
  • Supports listener sorting and attachment delivery (multiple monitors can cooperate with each other)
  • Supports two experience styles, Bus and Api

Differences from common EventBus and ApiBean

  Quantity EventBus Api Dami's Fact Sheet
broadcast have have none Send + listen and Api mode
answer have none have Send and wait for response (sendAndResponse) + listen (listen) + reply (reply) and Api mode
callback Yes+ none have- Send and wait for callback (sendAndCallback) + listen (listen) + reply (reply)
coupling weak- Weak+ Strong++  

If it involves class loader isolation: please mark it as compiled in the main program and mark it as optional in other modules.

What’s updated this time?

  • TopicRouterPatterned adds sorting support
  • TopicRouterPatterned separate routing capabilities, customizable
  • Add tag-based routing mode customization
  • Add @DamiTopic:index annotation attribute
  • dami-springboot-starter, increase spronboot 2.0 compatibility
  • Fix the problem that the dami-springboot-starter implementation class cannot be registered and unregistered normally after being proxied

Newly added customization effects (see the warehouse homepage for details. You can also customize your own Routing as needed):

public class Demo15_path {
    public void main(){
        //切换为模式匹配路由器 + RoutingPath(支持 * 和 ** 占位符;支持 / 或 . 做为间隔)
        DamiConfig.configure(new TopicRouterPatterned(RoutingPath::new));

        //拦截
        Dami.bus().listen("demo/a/*", (payload) -> {
            System.err.println(payload);
        });

        //发送事件
        Dami.bus().send("demo/a/1", "world1");
        Dami.bus().send("demo/a/2", "world2");
    }
}
public class Demo15_tag {
    public void main(){
        //切换为模式匹配路由器 + RoutingTag(":"前为主题,后按 "," 号分割作为tag)
        DamiConfig.configure(new TopicRouterPatterned(RoutingTag::new));

        //拦截
        Dami.bus().listen("demo.a:id", (payload) -> {
            System.err.println(payload);
        });

        //发送事件
        Dami.bus().send("demo.a:id", "world1");
        Dami.bus().send("demo.a:id,name", "world2");
    }
}

Question: Why not use distributed message queue? Sorry, it's really a different dimension.

project address

Guess you like

Origin www.oschina.net/news/259748/damibus-0-29-released