-
Notifications
You must be signed in to change notification settings - Fork 0
WonderQ API Documentation
Paul Warnick edited this page Aug 24, 2020
·
3 revisions
API documentation for the functions used to create WonderQ
messageBody: Object { message: $ANY }
callback: function
- We use
sendMessage
to save a new message into WonderQ -
messageBody
is an object with a single message property of any type - We use
callback
to return a success/error status to our REST API as well as the generatedmessageID
to return to the producer
callback: function
- We use
receiveMessage
to read a new message from the queue- We'll go through the queue in a FIFO order looking for the first message that is currently unlocked and ready for processing
- Once we've located an item that is ready for processing, we lock that item, generate the
receiptHandle
start thevisibilityTimeout
and return the item to the consumer-
receiptHandle
is used to once the consumer has finished processing to track deletion of the current message -
visibilityTimeout
is used to track how long a consumer can hold onto a message to process before it becomes visible to other consumers again
-
-
callback
is used to indicate the status to our REST API as well as the queue message itself
receiptHandle: uuidv4()
callback: function
- We use
deleteMessage
to delete a message from WonderQ- The
receiptHandle
passed in should be auuidv4<String>
that is associated with a message in the queue
- The
-
callback
returns the status of the call to the REST API