shinyscorpion / task_bunny

TaskBunny is a background processing application written in Elixir and uses RabbitMQ as a messaging backend
MIT License
202 stars 30 forks source link

Update Publisher interface #18

Closed ono closed 7 years ago

ono commented 7 years ago

To achieve https://github.com/shinyscorpion/task_bunny/pull/17, I needed to change the interface of Publisher. Since the implication is large, I am opening a separate PR here.

Publisher now focus on publishing messages received. It doesn't care the message format. Such concern is now handled in Job.enqueue/2.

Renamed SyncPublisher to Publisher at the same time. The module name shouldn't represent the implementation detail unless it is the very important feature. SyncPublisher can also mislead users to think that it waits for a message to be delivered.