class: ActiveMqConsumer
[26:14] (extern: com.lehman.aussom.ActiveMqConsumer) extends: object
Pulls messages from a destination. Created with ActiveMqSession.createConsumer() or createDurableSubscriber(). Consumption here is synchronous (receive); push-style consumption runs through ActiveMqListener under the Aussom Server listener runtime.
Methods
-
receive (
int TimeoutMs = 0)Receives the next message, waiting up to TimeoutMs. A timeout of 0 waits forever.
- @p
TimeoutMsis an int with the wait in milliseconds (default 0). - @r
AnActiveMqMessage object, or null when the timeout expires.
- @p
-
receiveNoWait ()
Returns the next message only if one is ready right now.
- @r
AnActiveMqMessage object, or null when none is ready.
- @r
-
getSelector ()
Gets this consumer's JMS selector.
- @r
Astring with the selector, or null when none is set.
- @r
-
close ()
Closes the consumer. Safe to call more than once.
- @r
thisobject
- @r