Skip to content

Commit

Permalink
cleanup interface [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
iammosespaulr committed Jan 29, 2025
1 parent 0164959 commit a5af660
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions marker/batch/messages/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@


class MessageQueue(ABC):

@staticmethod
@abstractmethod
def config_options():
pass

@abstractmethod
def publish(self, topic: str, message: str):
"""Publish a message to a topic/queue."""
Expand All @@ -14,3 +20,8 @@ def consume(self, topic: str, callback):
A callback function is called for each message.
"""
pass

@abstractmethod
def ack(self, msg, **kwargs):
"""Acknowledge a message."""
pass

0 comments on commit a5af660

Please sign in to comment.