python-banshee
python-banshee copied to clipboard
Channels
Description
Allow a message to be delegated to "channels" where it will be passed to a background worker.
Motivation
It mean's work can be carried out by background workers, or sent to other microservices, rather than being dependent on the receiving process.
Possible implementation
An abstract Channel class supporting the following operations:
-
read-- read and unserialise messages from the channel -
send-- serialise and send a message to the channel -
ack-- acknowledge that a message was processed successfully -
reject-- prevent any retrying of a message
This would be used by a ExternalMiddleware and Worker class which would handle adding messages to the transport and processing them.
The registry will need to provide a means to associate a request type with a transport.