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

there is a way to change the @Handler priority programmatically? #145

Closed daniv closed 7 years ago

daniv commented 7 years ago

i am using Spring boot and if configuration A is present i need to post an event , and the listeners should follow a certain order. however if configuration B is present, need to post the same event, however listeners should be handle the event in different order. if it is possible, i cannot see how i can do it ( only via priority property ) if is not possible , i would suggest a an AnnotationTransformer handler like TestNG.

public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod);

the interface belongs to org.testng.IAnnotationTransformer

which in our case it should be an Handler annotation.

bennidi commented 7 years ago

@daniv There is no such mechanism in place. It seems a bit unusual to require event handling order to be different in test scenarios than in production. Maybe there is something about your code design that you can change?