s8sg / goflow

A Golang based high performance, scalable and distributed workflow framework
MIT License
1.06k stars 129 forks source link

[Code Quality] Abstract Queue Worker #69

Open s8sg opened 11 months ago

s8sg commented 11 months ago

Queue Worker is mainly used to handle async operations. Queue working internally uses RMQ - which internally uses Redis

The goal is to abstract the queue-worker in a way so that all RMQ specific details gets abstracted into Queue Worker interface QueueWorker in theory should abstract

  1. Enqueue Workload Tasks (WorkloadRequest)
  2. Enqueue Flow Operations Tasks (NewRequest, PartialRequest, Stop, Pause, Resume)
  3. Consume handler func(task *Task) error for NewRequest, PartialRequest, Stop, Pause, Resume, WorkloadResponse