Description Usage Arguments Details Value Note Author(s) References See Also Examples
For a producer bound to a queue, put a text message into that queue.
1 | status <- messageQueue.producer.putText(producer, text)
|
producer |
The producer object created from |
text |
The text message to put onto the queue |
.
Returns a positive number (i.e. > 0) if it was successful. Returns a negative number (i.e. < 0) if it was unsuccessful.
.
Matt MacGillivray
.
messageQueue.factory.getProducerFor
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # NORMALLY, this url would be of the form 'tcp://host:61616', but for testing, activeMQ provides
# a local/internal queue that works by default
queueUrl <- "vm://localhost?broker.persistent=false"
# create a queue producer
queueAproducer <- messageQueue.factory.getProducerFor(queueUrl,"queueA","activeMQ")
# ... do some stuff ...
# put a message on the queue
textMessage <- "this is the message I want to send"
status <- messageQueue.producer.putText(queueAproducer, textMessage)
# close the producer
status <- messageQueue.producer.close(queueAproducer)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.