public class ResequenceMessageStore extends JDBCMessageStore
This represents the store which will allow to re-sequence messages.
JDBCMessageStoreMESSAGE_COLUMN_NAMEdescription, fileName, lock, messageStoreMBean, messageStoreObservers, name, parameterKeyMap, parameters, sequence, synapseConfiguration, synapseEnvironment| Constructor and Description |
|---|
ResequenceMessageStore() |
| Modifier and Type | Method and Description |
|---|---|
protected Statement |
getStoreMessageStatement(MessageContext context,
Long sequenceId)
Stores message in database by providing the correct sequence id.
|
void |
init(SynapseEnvironment synapseEnvironment)
Initializes the JDBC Message Store
|
MessageContext |
peek()
Select and return the first element in current table
|
protected List<Statement> |
removeMessageStatement(String msgId)
Remove message statement.
|
void |
setParameters(Map<String,Object> parameters)
Set JDBC store parameters
|
clear, deserializeMessage, destroy, get, get, getAll, getConsumer, getJdbcConfiguration, getProcessedRows, getProducer, messageContentResultSet, remove, remove, serialize, size, storeaddParameter, addParameterKey, dequeued, difference, enqueued, getArtifactContainerName, getDescription, getFileName, getLock, getName, getParameterKey, getParameterKeyMap, getParameters, getType, isEdited, nextConsumerId, nextProducerId, notifyMessageAddition, notifyMessageRemoval, registerObserver, setArtifactContainerName, setDescription, setFileName, setIsEdited, setName, unregisterObserverpublic void setParameters(Map<String,Object> parameters)
setParameters in interface MessageStoresetParameters in class JDBCMessageStoreparameters - - List of parameters to setpublic void init(SynapseEnvironment synapseEnvironment)
init in interface ManagedLifecycleinit in class JDBCMessageStoresynapseEnvironment - SynapseEnvironment for the storeprotected List<Statement> removeMessageStatement(String msgId)
Remove message statement.
When re-sequenced we need to maintain the last processed id along with the removal. So that at an event the node crashes we know where to start from.
Statement to remove the message once a response is received.
removeMessageStatement in class JDBCMessageStoremsgId - message id of the statement which should be removed.protected Statement getStoreMessageStatement(MessageContext context, Long sequenceId) throws StoreException
Stores message in database by providing the correct sequence id.
Generates the statement to store message in database.
If the sequence id is specified the corresponding sequence id will be stored, sequence id will be specified if re-sequence message store is being used. In other times this value will be null.
getStoreMessageStatement in class JDBCMessageStorecontext - the content of the message.sequenceId - the sequence id of the message (optional).StoreException - at an event there's an exception when generating the statement.ResequenceMessageStorepublic MessageContext peek() throws SynapseException
peek in class JDBCMessageStoreSynapseExceptionCopyright © 2005–2024 Apache Software Foundation. All rights reserved.