Package net.blakez.bppmq.core.queue
Interface MessageRecordRepository
- All Known Implementing Classes:
CouchMessageRecordRepository
public interface MessageRecordRepository
Interface defining operations for managing MessageRecords.
- Author:
- Peter Blakeley : @pblakez pb@blakez.org
-
Method Summary
Modifier and TypeMethodDescriptionDeletes a message by topic and index.Deletes a message by its UUID.Lists messages for a topic starting from a specific index.Reads a message by its UUID.Retrieves metadata for a given topic.Reads a specific message by topic and index.saveMeta
(MetaRecord metaRecord) Saves or updates metadata for a topic.topics()
Retrieves a list of all available topic names.write
(MessageRecord record) Writes a new message record.
-
Method Details
-
meta
Retrieves metadata for a given topic.- Parameters:
topic
- The topic name.- Returns:
- A Result containing the MetaRecord or errors.
-
list
Lists messages for a topic starting from a specific index.- Parameters:
topic
- The topic name.startIndex
- The starting index for the list.batchSize
- The maximum number of messages to retrieve.- Returns:
- A Result containing a list of MessageRecords or errors.
-
read
Reads a specific message by topic and index.- Parameters:
topic
- The topic name.index
- The index of the message.- Returns:
- A Result containing the MessageRecord or errors.
-
write
Writes a new message record.- Parameters:
record
- The MessageRecord to write.- Returns:
- A Result containing the written MessageRecord or errors.
-
delete
Deletes a message by topic and index.- Parameters:
topic
- The topic name.index
- The index of the message to deleteID.- Returns:
- A Result containing the deleted MessageRecord or errors.
-
deleteID
Deletes a message by its UUID.- Parameters:
uuid
- The UUID of the message to deleteID.- Returns:
- A Result containing the deleted MessageRecord or errors.
-
lookupID
Reads a message by its UUID.- Parameters:
uuid
- The UUID of the message to lookupID.- Returns:
- A Result containing the MessageRecord or errors.
-
topics
Retrieves a list of all available topic names.- Returns:
- A Result containing a list of topic strings or errors.
-
saveMeta
Saves or updates metadata for a topic.- Parameters:
metaRecord
- The MetaRecord to save.- Returns:
- A Result containing the saved MetaRecord or errors.
-