Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Subscription Comparator is limiting the number of classes that are notified of events #3

agile001 opened this Issue · 1 comment

2 participants

agile001 Benjamin Diedrichsen

Hi Benni,

I spent half of yesterday debugging an issue I was seeing when I would subscribe multiple classes to the same event but only see the first 2 registered listeners being notified so I thought I'd share my findings with you.

I've forked your repo and updated it with the debugging log entries I created and a bit of hack code to get around the cause of the problem I was seeing.

I've also added a new unit test class (org.mbassy.MBassadorExtendedTest) which exposes the issue for you to see.

In the Subscription class I've included a boolean switch in the SubscriptionByPriorityDesc comparator so you can turn the original code on and off to see it's affect on the unit test results.

Hope this is useful.

David E.

Benjamin Diedrichsen

Pretty cool Dave. Thanks a lot (how could I forget to sort the hash codes and write a proper unit test? damn!). I will update the code tomorrow.

Benjamin Diedrichsen bennidi referenced this issue from a commit
benni bugfix issue #3, added more test cases 989ed67
Benjamin Diedrichsen bennidi was assigned
Benjamin Diedrichsen bennidi closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.