The topic of events receives information about changes in different parts of the unit quickly, in thousands per second. I need to create a projection of this aggregate in a database that is updated not on a per-event basis, but once per second. How can Rebus be used to process not every message individually to create an aggregate projection in the database, but to receive about a thousand messages per second and process them all, and only complete their processing after successfully processing all thousands of messages? If an error occurs when processing one of the thousand messages, the entire thousand messages must be considered processed with an error and sent for a second attempt to be processed by the message handlers of the Rebus bus.
So far, I only see an option to run parallel processing of dozens of message streams. Wait for Rebus to run them all. Aggregate them all in memory and send an aggregated message, after which complete the processing of dozens of primary messages. Then repeat this with dozens of aggregated messages. But maybe it can be done better somehow?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744862189a4597770.html
评论列表(0条)