public class FederatedQueueConsumer extends Object implements MessageHandler, SessionFailureListener
Modifier and Type | Class and Description |
---|---|
static interface |
FederatedQueueConsumer.ClientSessionCallback |
Modifier and Type | Field and Description |
---|---|
static String |
FEDERATION_NAME |
static String |
FEDERATION_UPSTREAM_NAME |
Constructor and Description |
---|
FederatedQueueConsumer(Federation federation,
ActiveMQServer server,
Transformer transformer,
FederatedConsumerKey key,
FederationUpstream upstream,
FederatedQueueConsumer.ClientSessionCallback clientSessionCallback) |
Modifier and Type | Method and Description |
---|---|
void |
beforeReconnect(ActiveMQException exception)
Notifies that a connection has failed due to the specified exception.
|
void |
close() |
void |
connectionFailed(ActiveMQException exception,
boolean failedOver)
Notifies that a connection has failed due to the specified exception.
|
void |
connectionFailed(ActiveMQException exception,
boolean failedOver,
String scaleDownTargetNodeID)
Notifies that a connection has failed due to the specified exception.
|
int |
decrementCount() |
int |
incrementCount() |
void |
onMessage(ClientMessage clientMessage)
Notifies the MessageHandler that a message has been received.
|
void |
start() |
public static final String FEDERATION_NAME
public static final String FEDERATION_UPSTREAM_NAME
public FederatedQueueConsumer(Federation federation, ActiveMQServer server, Transformer transformer, FederatedConsumerKey key, FederationUpstream upstream, FederatedQueueConsumer.ClientSessionCallback clientSessionCallback)
public int incrementCount()
public int decrementCount()
public void start()
public void close()
public void onMessage(ClientMessage clientMessage)
MessageHandler
onMessage
in interface MessageHandler
clientMessage
- a messagepublic void connectionFailed(ActiveMQException exception, boolean failedOver)
FailureListener
connectionFailed
in interface FailureListener
exception
- exception which has caused the connection to failpublic void connectionFailed(ActiveMQException exception, boolean failedOver, String scaleDownTargetNodeID)
FailureListener
connectionFailed
in interface FailureListener
exception
- exception which has caused the connection to failscaleDownTargetNodeID
- the ID of the node to which messages are scaling downpublic void beforeReconnect(ActiveMQException exception)
SessionFailureListener
beforeReconnect
in interface SessionFailureListener
exception
- exception which has caused the connection to failCopyright © 2019 JBoss by Red Hat. All rights reserved.