We have started using the max age for a stream in our store to roll events off after a specified time period (for testing purposes a minute). Creating the stream and setting the metadata works great on the first run. We can pump data in, see events populate, etc.
If I disconnect from the event store and reconnect, I start seeing these messages in the in the EventStore logs:
Error while wrapping message EventStore.Core.Messages.ClientMessage+ReadAllEventsForwardComepleted
Object reference not set to an instance of an object
The reconnect is successful. Once I started adding new events into the system and I subscribe to the AllEvents stream, we start to see more errors
[08276,56,17:21:59.836] Error while processing message ReadStreamEventsBackward
InternalCorrId: 33de209a-ff67-4f56-9f86-1d87a7bbeced, CorrelationId: 33de209a-ff
67-4f56-9f86-1d87a7bbeced, EventStreamId: $streams, FromEventNumber: -1, MaxCoun
t: 50, ResolveLinkTos: True, RequireMaster: False, ValidationStreamVersion: 4 in
queued handler ‘StorageReaderQueue #1’.
link not in proper format.
The subscriptions don’t work, and the UI won’t even display existing streams. A start and restart of Event Store does not fix the issue, the only way I have solved the problem is to DELETE all the data and start over. It appears that all the Read Stream events, connections, etc. work as they return successful or not in a faulted state, (or at least I have not an error state yet).
If I remove the SetMetaData code, connect and reconnect work great. I can stop and start at will, subscriptions work as planned, etc. It is only when we set the metadata for a stream.