public class DequeueTask<T>
extends java.lang.Object
implements org.apache.activemq.artemis.api.core.client.MessageHandler
Constructor and Description |
---|
DequeueTask(QueueConnector queue,
ChannelSink<T> consumer,
SourceReader<java.io.InputStream,T> deserializer,
boolean redeliverOnCrash)
Creates a new instance.
|
DequeueTask(QueueConnector queue,
MessageSink<org.apache.activemq.artemis.api.core.client.ClientMessage,T> consumer,
SourceReader<java.io.InputStream,T> deserializer,
boolean redeliverOnCrash)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
onMessage(org.apache.activemq.artemis.api.core.client.ClientMessage msg) |
public DequeueTask(QueueConnector queue, ChannelSink<T> consumer, SourceReader<java.io.InputStream,T> deserializer, boolean redeliverOnCrash) throws org.apache.activemq.artemis.api.core.ActiveMQException
queue
- provides access to the queue from which to fetch messages.consumer
- consumes message data fetched from the queue.deserializer
- de-serialises the message data, a T
-value.redeliverOnCrash
- if true
and the process terminates
abnormally (e.g. segfault, power failure) while the consumer is busy
processing a message, the message will be delivered again once the
process is rebooted. If false
, a message will only ever be
delivered once to the consumer.org.apache.activemq.artemis.api.core.ActiveMQException
- if an error occurs while setting up Artemis to
receive messages on the specified queue.java.lang.NullPointerException
- if any argument is null
.public DequeueTask(QueueConnector queue, MessageSink<org.apache.activemq.artemis.api.core.client.ClientMessage,T> consumer, SourceReader<java.io.InputStream,T> deserializer, boolean redeliverOnCrash) throws org.apache.activemq.artemis.api.core.ActiveMQException
queue
- provides access to the queue from which to fetch messages.consumer
- consumes message data and metadata fetched from the queue.redeliverOnCrash
- if true
and the process terminates
abnormally (e.g. segfault, power failure) while the consumer is busy
processing a message, the message will be delivered again once the
process is rebooted. If false
, a message will only ever be
delivered once to the consumer.deserializer
- de-serialises the message data, a T
-value.org.apache.activemq.artemis.api.core.ActiveMQException
- if an error occurs while setting up Artemis to
receive messages on the specified queue.java.lang.NullPointerException
- if any argument is null
.