Skip to content

0.31.0

Compare
Choose a tag to compare
@oskardudycz oskardudycz released this 27 Feb 16:04
· 41 commits to main since this release

🚀 What's New

  • Added the first version of PostgreSQL async projections by @oskardudycz in #197

Projections are defined the same way as inline ones (see more in the article).

The easiest way to use it is to:

const eventStore = getPostgreSQLEventStore(connectionString);

const consumer = eventStore.consumer();

consumer.processor({projection: someProjection });
consumer.processor({projection: otherProjection});

await consumer.start()

You can also run it explicitly:

const consumer = postgreSQLEventStoreConsumer({
   connectionString,
});

consumer.processor({projection: someProjection });
consumer.processor({projection: otherProjection});

await consumer.start()

or

const consumer = postgreSQLEventStoreConsumer({
   connectionString,
   processors: [
     postgreSQLProcessor({ projection: someProjection}),
     postgreSQLProcessor({ projection: otherProjection }),
   ],
});

await consumer.start();

I'm also considering, in the further releases, making them automatically registered as:

const eventStore = getPostgreSQLEventStore({
  connectionString,
  projections: projections.async([someProjection, otherProjection]),
});

// consumer will get async projections registered as processors
const consumer = eventStore.consumer();

await consumer.start()

📚 Docs

  • Added API reference link to documentation sidebar and update title in API docs by @tburny in #199

New Contributors

Full Changelog: 0.30.0...0.31.0