Java多播事件總線 Avis
Avis 是一個多播事件總線。它提供了一個快捷的發布/訂閱事件的路由服務。
-
Fast broadcast message delivery. No requirement to support transactions or persistence, plus concise message selection allows near real-time delivery.
-
Flexible message format. Messages are just name-value pairs.
-
Content-based subscription. Select messages using subscription expressions like
From == 'logger' && Severity > 3
or(string (Message) && Timeout > 0) || regex (Message, 'News:.*')
. -
Federation of multiple message routers. Replicate selected messages between any configuration of routers to form local and wide-area message networks.
-
Security. Supports per-subscription access control and SSL/TLS client/server authentication and encryption.
-
Simplicity. No external dependencies and no configuration required. Avis runs on any platform that supports Java 5 or later.
-
Client libraries for Java and C. Write Avis clients for a wide variety of platforms.
示例代碼:
Elvin elvin = new Elvin ("elvin://elvin_router"); Notification ntfn = new Notification (); ntfn.set ("Status-Message", 1000); ntfn.set ("Host-Name", hostName ()); ntfn.set ("Department", lookupDepartment ()); ntfn.set ("Percent-Disk-Free", diskFreePercentage ()); elvin.send (ntfn); elvin.close ();