rinq / rinq-go

A cross-language command bus and distributed ephemeral data store.
Other
17 stars 1 forks source link

Refactor notifications to use a "transport" model. #170

Closed jmalloc closed 2 years ago

jmalloc commented 6 years ago

This PR is the first step of an internal refactor that attempts to reduce the complexity of the various subsystems by reducing the responsibilities of the rinqamqp package to marshalling and routing topology configuration.

For notifications, all communication between Rinq's core logic layer and the AMQP "transport" is now handled via interfaces in the transport package.

jmalloc commented 6 years ago

/cc @danilvpetrov

jmalloc commented 6 years ago

I've accidentally lost the 'graceful shutdown' behaviour of the notification system in this PR. I'll need to update it so that when the peer is stopped gracefully any running notification handlers are allowed to finish before the peer.Done() channel is closed. Clearly this also needs some functional tests.