Live data from Hacker News

Emissary, a fast open-source Java messaging library

github.com

11–16 of 16 posts

Re: Emissary, a fast open-source Java messaging library

#12

Emissary is a simple-to-use, no dependency, yet BLAZING FAST messaging library for decoupling messages (requests and events) and message handlers. Emissary aims to take advantage of the simplicity of using the annotations for handlers (e.g. @RequestHandler/@EventHandler) without the drawbacks of reflection (slow). What differentiates Emissary from other messaging/dispatch libraries? It takes advantage of java.lang.in…

Are you planning to add persistent events as well, so that events are not lost due to crashes

Re: Emissary, a fast open-source Java messaging library

#13

Emissary is a simple-to-use, no dependency, yet BLAZING FAST messaging library for decoupling messages (requests and events) and message handlers. Emissary aims to take advantage of the simplicity of using the annotations for handlers (e.g. @RequestHandler/@EventHandler) without the drawbacks of reflection (slow). What differentiates Emissary from other messaging/dispatch libraries? It takes advantage of java.lang.in…

Assuming that you are the author of Emissary, this could be a Show HN, I think. https://news.ycombinator.com/showhn.html

Yes, I am the author. I didn't know that, I'll give it a try. Thank you for the tip!

Re: Emissary, a fast open-source Java messaging library

#14

Emissary is a simple-to-use, no dependency, yet BLAZING FAST messaging library for decoupling messages (requests and events) and message handlers. Emissary aims to take advantage of the simplicity of using the annotations for handlers (e.g. @RequestHandler/@EventHandler) without the drawbacks of reflection (slow). What differentiates Emissary from other messaging/dispatch libraries? It takes advantage of java.lang.in…

Are you planning to add persistent events as well, so that events are not lost due to crashes

This a frequently requested feature. At the moment, it only handles in-process messages but allowing for persistent events is definitely in the roadmap. It's not built-in right now, but this can be achieved by implementing custom RequestHandlerInvocationStrategy and EventHandlerInvocationStrategy. For example, one can implement an invocation strategy to serialize and send certain events to Kafka, queue, or your DB of choice.

See: https://github.com/joel-jeremy/emissary/blob/main/emissary-c...

Here are the default invocation strategies built-in right now: https://github.com/joel-jeremy/emissary/tree/main/emissary-c...

Re: Emissary, a fast open-source Java messaging library

#15

I'm a big fan of Guava's EventBus. Easy to implement and straightforward to understand. This library does seem to require more setup and I don't see the immediate advantages, also why does it require an instanceProvider? I don't understand what that does.

Emissary really shines if performance is a top priority.

The setup is more or less similar, you register a bunch of event handlers when initializing the library. The main difference is that, in addition to events, Emissary also supports "request" messages. Requests enforce the invariant that only one handler should handle it - if there are multiple handlers registered for a given request, Emissary will throw an error. That, and some extension points which is only needed for more advance use cases.

The InstanceProvider allows users to let the dependency injection (DI) framework of their choice instantiate the request/event handler classes (see https://github.com/joel-jeremy/emissary?tab=readme-ov-file#e...). This is in contrast to the way EventBus does it where subscribers need to be instantiated at startup time. By leveraging the DI framework, additional services can be injected to the handler's constructor.

Re: Emissary, a fast open-source Java messaging library

#16

Earlier quoted context omitted.

Assuming that you are the author of Emissary, this could be a Show HN, I think. https://news.ycombinator.com/showhn.html

> To post, submit a story whose title begins with "Show HN". I always enjoy how low-tech this website is. Not necessarily great UX, but it's quaint.

And the only one I can think of where I can't post my comment using Ctrl+Enter.
Post reply on HN