Description Usage Arguments Details Value Note Author(s) See Also Examples
Closes and releases memory reserved when this consumer was created.
When a queue consumer is created, objects are created in the background and exist for the lifetime of that consumer. Explicitly closing the consumer safely deallocates memory and restores natural order to the world.
1 | status <- messageQueue.consumer.close(consumer)
|
consumer |
The consumer object created from |
Closes a consumer.
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.getConsumerFor
1 2 3 4 5 6 7 8 9 10 11 | # 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 consumer
queueAconsumer <- messageQueue.factory.getConsumerFor(queueUrl,"queueA","activeMQ")
# ... do some stuff ...
# close the consumer
status <- messageQueue.consumer.close(queueAconsumer)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.