eventuate-tram / eventuate-tram-core

Transactional messaging for microservices
Other
1.03k stars 186 forks source link

Reactive message publishing for several aggregates #151

Open dartartem opened 3 years ago

dartartem commented 3 years ago

Is there value in supporting ReactiveDomainEventPublisher.Builder() that supports publishing multiple messages for different aggregates and doing a batch insert into the database (supported by Database API?)

dartartem commented 3 years ago

Batch insert into the database is not supported for now.

It seems all databases can use the same syntax (example from postgres docs):

INSERT INTO films (code, title, did, date_prod, kind) VALUES
    ('B6717', 'Tampopo', 110, '1985-02-10', 'Comedy'),
    ('HG120', 'The Dinner Game', 140, DEFAULT, 'Comedy');

It requires modification of eventuate-common. Also it is not clear what should be changed to support ids generated by database. But batch insert is not necessary for builder support. Batch insert optimization can be done later.