commanded/eventstore

Use configurable event store query timeout for subscription queries

slashdotdash opened this issue · 0 comments

An event store subscription makes use of the following database queries:

  • create a new subscription - when starting a subscription for the first time.
  • read stream forward - used to fetch "unseen" events from the database, executed on subscription start and when catching up.
  • ack last seen event - to store the position of the subscription, by default it is updated after processing each event.

It is possible to configure the query timeout for an event store using the :timeout option (default 15s) or to pass it as an option when subscribing to a stream. However this option is not currently being used by the subscription when executing the above database queries. Since no timeout is being set, the default Postgrex query timeout will be used (15s). The configurable :timeout option should be used by subscription database queries.