Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
Michael Freidgeim edited this page Oct 1, 2018 · 4 revisions

FAQ

This is a collection of q's and a's gathered from the ddd-cqrs-es slack, in no particular order.

Q: Should SqlStreamStore have a singleton or per request lifetime?

Singleton per process lifetime, bit like httpclient. But, it depends if you are using subscriptions or not.

To be elaborated on later

Q: What should I use instead of Int.MaxValue for the maxCount param?

Depends a bit on your use case. Bigger maxCount results higher network payloads and memory usage, but is more efficient in batching.

In general, you want to do paging over your stream(s) with a page value of 1 < x < 1000.

Q: What should I use instead of CLR type names for the message's type?

Your message types will outlive your .net CLR types. Moving events along namespaces will break stuff.

As an alternative, use a dictionary/map between your message types and the CLR type you want to deserialize your message into.

Q: What is a stream?

In the Event Store streams are like documents in a document database. See more details in the article at https://eventstore.org/blog/20130210/the-cost-of-creating-a-stream/

Q: Why StreamMessage.GetJsonData is a delegate returning Task Instead of simple string property ?

When prefetch is turned off this will result in a call to the server. From https://github.com/SQLStreamStore/SQLStreamStore/pull/49#issue-92659628