Class JDBCConsumer
- java.lang.Object
-
- org.apache.synapse.message.store.impl.jdbc.JDBCConsumer
-
- All Implemented Interfaces:
MessageConsumer
public class JDBCConsumer extends Object implements MessageConsumer
JDBC Store Consumer
-
-
Constructor Summary
Constructors Constructor Description JDBCConsumer(JDBCMessageStore store)
Initialize consumer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
ack()
Ack on success message sending by processorboolean
cleanup()
Cleanup the consumerString
getId()
Get consumer idboolean
isAlive()
Check JDBC consumer is aliveMessageContext
receive()
Select and return the first element in current tablevoid
setAlive(boolean isAlive)
Set isAlive flag in JDBC consumervoid
setId(int id)
Set consumer id
-
-
-
Constructor Detail
-
JDBCConsumer
public JDBCConsumer(JDBCMessageStore store)
Initialize consumer- Parameters:
store
- - JDBC message store
-
-
Method Detail
-
receive
public MessageContext receive()
Select and return the first element in current table- Specified by:
receive
in interfaceMessageConsumer
- Returns:
- - Select and return the first element from the table
-
ack
public boolean ack()
Ack on success message sending by processor- Specified by:
ack
in interfaceMessageConsumer
- Returns:
- Success of removing
-
cleanup
public boolean cleanup()
Cleanup the consumer- Specified by:
cleanup
in interfaceMessageConsumer
- Returns:
- Success of cleaning
-
isAlive
public boolean isAlive()
Check JDBC consumer is alive- Specified by:
isAlive
in interfaceMessageConsumer
- Returns:
- consumer status
-
setAlive
public void setAlive(boolean isAlive)
Set isAlive flag in JDBC consumer- Specified by:
setAlive
in interfaceMessageConsumer
- Parameters:
isAlive
- status
-
setId
public void setId(int id)
Set consumer id- Specified by:
setId
in interfaceMessageConsumer
- Parameters:
id
- ID
-
getId
public String getId()
Get consumer id- Specified by:
getId
in interfaceMessageConsumer
- Returns:
- consumerId - Consumer identifier
-
-