Package org.apache.synapse.message
Interface MessageConsumer
-
- All Known Implementing Classes:
InMemoryConsumer,JDBCConsumer,JmsConsumer,RabbitMQConsumer
public interface MessageConsumer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanack()Acknowledges the last message received so that it will be removed from the store.booleancleanup()Cleans up this message consumerStringgetId()Returns the ID of this Message consumer.booleanisAlive()Check availability of connectivity with the message storeMessageContextreceive()Receives the next message from the store.voidsetAlive(boolean isAlive)Set the connectivity state with the message storevoidsetId(int i)Sets the ID of this message consumer.
-
-
-
Method Detail
-
receive
MessageContext receive()
Receives the next message from the store.- Returns:
- Synapse message context of the last message received from the store.
-
ack
boolean ack()
Acknowledges the last message received so that it will be removed from the store.- Returns:
trueif the acknowledgement is successful.falseotherwise.
-
cleanup
boolean cleanup()
Cleans up this message consumer- Returns:
trueif cleanup is successful,falseotherwise.
-
isAlive
boolean isAlive()
Check availability of connectivity with the message store- Returns:
trueif connection available,falseotherwise.
-
setAlive
void setAlive(boolean isAlive)
Set the connectivity state with the message store- Parameters:
isAlive- if connection available.
-
setId
void setId(int i)
Sets the ID of this message consumer.- Parameters:
i- ID
-
getId
String getId()
Returns the ID of this Message consumer.- Returns:
- ID
-
-