[axonframework] ProcessingGroup

Hi Chun,

which ProcessingGroup value do you want to retrieve?

Normally, processing groups are only used in the Configuration, to group certain event handlers and define non-functional behavior for these groups, such as error handling. The default ProcessingGroup name for an Event Handler is its package name.

Kind regards,


I know that I can assign processing group by putting @ProcessingGroup,is there anyway that I can dynamically assign the value through API call. I tried to use SpEL in the annotation, but it won’t be parse dynamically, but rather a string literal. I wanted to create multiple processing groups dynamically with the same code.

To clarify the use case, we deploy the same code into two QA environments. They have different identifiers. I want instances from both env to process the same events. If the processing group is the same, only one of them is going to process the event. I have to make the processing group different so that both env will receive the same events.

EventProcessingConfigurer.assignProcessingGroup(Function<String, String> assignmentRule) is the way to go. It is the processor name that actually defines the parallel processing. This will not change the processingGroup value. Can the guru from axon confirm there is no side effect? Thanks.

I confirm :slight_smile:

Do be careful with naming. The processor name is used to locate the proper token and continue processing where it stopped previously. You’ll need to make sure the name is consistent across restarts.