bennidi / mbassador

Powerful event-bus optimized for high throughput in multi-threaded applications. Features: Sync and Async event publication, weak/strong references, event filtering, annotation driven
MIT License
955 stars 146 forks source link

Handlers get message only the first time #128

Closed fiunchinho closed 8 years ago

fiunchinho commented 8 years ago

I'm trying to use mbassador in a Play based application that publish messages when certain routes are executed. When I start my application and visit the route that emits messages, handlers receive the message. But if I do it again, handlers won't get any message.

Looking through the documentation, I see this

The basic contract of the bus is that it will deliver a specific message exactly once to each of the subscribed message handlers.

But the second time I visit the route, a new message is created with a different message UUID, so it should send the message to the handlers. Am I missing something here?

nikoliazekter commented 8 years ago

Could you please post SSCCE?

bennidi commented 8 years ago

I assume you have weak references to your listeners. They have most likely been GC'ed.

2015-11-08 12:19 GMT+01:00 Jose Armesto notifications@github.com:

I'm trying to use mbassador in a Play based application that publish messages when certain routes are executed. When I start my application and visit the route that emits messages, handlers receive the message. But if I do it again, handlers won't get any message.

Looking through the documentation, I see this

The basic contract of the bus is that it will deliver a specific message exactly once to each of the subscribed message handlers.

But the second time I visit the route, a new message is created with a different message UUID, so it should send the message to the handlers. Am I missing something here?

— Reply to this email directly or view it on GitHub https://github.com/bennidi/mbassador/issues/128.

fiunchinho commented 8 years ago

Ok, thanks