jmalloc / ax

A message-driven application toolkit for Go. [EXPERIMENTAL]
MIT License
9 stars 3 forks source link

Allow message handlers to optionally implement an Initialize() method. #81

Closed jmalloc closed 7 months ago

jmalloc commented 6 years ago

This would be called when the pipeline is initialized, allowing the message handler to perform any "pre-flight" checks.

I'm envisaging this could be a great place to verify saga configurations, etc, especially where there are mappers or persisters in use that require the saga to implement additional interfaces.

It might be good to adopt this approach for all of the configurable elements of the endpoints, such as validators.