NFIBrokerage / radical

playground for EventStore persistent subscriptions
3 stars 0 forks source link

write notes here #2

Closed the-mikedavis closed 4 years ago

the-mikedavis commented 4 years ago

working on branch impl, writing down notes of learnings here

the-mikedavis commented 4 years ago

https://hexdocs.pm/broadway/custom-producers.html#content

broadway consists of 3 big pieces: producers, processors, and batchers

producers listen for new events and processors handle them

the-mikedavis commented 4 years ago

broadway is based on composing genstages https://hexdocs.pm/gen_stage/GenStage.html

genstage defines abstractions for producers, consumers, and producer-consumers

the-mikedavis commented 4 years ago

Buffer size must be larger than read batch size error message out of the developer console when trying to update a persistent subscription

oddly enough it's an avenue to validate persistent subscription configuration

with a bad configuration, there will appear to be 0 events "known"

once the configuration is corrected, the number of events corrects to the number in the stream

the-mikedavis commented 4 years ago

the subscription id returned from PersistentSubscriptionConfirmation is not the same as the one provided in ConnectToPersistentSubscription

the latter is simply the group, the former is used as the subscription ID when performing nacks and acks

the-mikedavis commented 4 years ago

looks like the general form for a persistent subscription stream is <stream-name>::<group>

the-mikedavis commented 4 years ago

☝️ that also happens to turn out to be the subscription id