This sample shows how to use the zero.timer
and zero.kicker
modules to monitor a simple queue
using the kicker and receiver
pattern.
The Post message
tab contains a form that posts messages to a queue.
You can use the Browse queue
tab to review the messages on the queue that have not yet been processed by
the receiver.
The zero.config
file contains timer tasks that drives SampleKicker
every 30 seconds
to poll the queue for messages. When the queue contains a message to process, the kicker
notifies the receiver
using a HTTP POST. The SampleReceiver
handles this POST by reading the message from the queue and
firing a sampleMessage
event, which is handled by sampleMessageHandler.groovy
.
The components of this demonstration write messages to standard output at key points. Review the contents of the trace log file
to see this information.
Read the documentation for this sample application, for more information.
Use this form to post a message to the sample queue.
The form POSTs the sampleQueue.groovy
script, which
sends the message to the queue.
When the form is posted, the status message and queue length returned from the script is
displayed below.
Use this form to browse the messages that have not yet been processed.
The form GETs the messages from the sampleQueue.groovy
script and the results are displayed below.