Question about parallel execution
Hello, Scenario: Service is consuming events from multiple topics (A and B). I need to retain order and sequential processing for topic A, but need to execute events in parallel for topic B. How can this be achieved?
Hello,
CAP's parallel execution configuration is global and does not support separate settings for subscribers.
any plans to add this feature? or any hints how we can do it?
These are some hints that might be useful for your short-term solution, we still need to investigate whether to add this feature or not.
- Place subscribers that require parallel execution into one or more groups, e.g.,
parallel-group-1,parallel-group-2.
[CapSubscribe("A", Group="parallel-group-1")]
public void SubA(){
}
[CapSubscribe("B", Group="parallel-group-2")]
public void SubA(){
}
- Set the
UseDispatchingPerGroupoption to true. - Modify
IDispatcher.PerGroup.csline 203 as follows :
if (_enableParallelExecute || key =="parallel-group-1.v1" || key== "parallel-group-2.v1"){
}
Thanks, will dive deeper
We plan to support consumer concurrent in v8.2.0, please check out the PR #1537 !
@PoteRii Version 8.2.0-preview-233720681 is released, take a try.