public class RabbitMQStore extends AbstractMessageStore
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AMQ_PREFIX |
static int |
DEFAULT_RETRY_COUNT |
static int |
DEFAULT_RETRY_INTERVAL |
static java.lang.String |
EXCHANGE_NAME |
static java.lang.String |
HOST_NAME |
static java.lang.String |
HOST_PORT |
static java.lang.String |
PASSWORD |
static java.lang.String |
PUBLISHER_CONFIRMS |
static java.lang.String |
QUEUE_NAME |
static java.lang.String |
RETRY_COUNT |
static java.lang.String |
RETRY_INTERVAL |
static java.lang.String |
ROUTING_KEY |
static java.lang.String |
SSL_ENABLED |
static java.lang.String |
SSL_KEYSTORE_LOCATION |
static java.lang.String |
SSL_KEYSTORE_PASSWORD |
static java.lang.String |
SSL_KEYSTORE_TYPE |
static java.lang.String |
SSL_TRUSTSTORE_LOCATION |
static java.lang.String |
SSL_TRUSTSTORE_PASSWORD |
static java.lang.String |
SSL_TRUSTSTORE_TYPE |
static java.lang.String |
SSL_VERSION |
static java.lang.String |
USERNAME |
static java.lang.String |
VIRTUAL_HOST |
description, fileName, lock, messageStoreMBean, messageStoreObservers, name, parameterKeyMap, parameters, sequence, synapseConfiguration, synapseEnvironment
Constructor and Description |
---|
RabbitMQStore() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Delete all the Messages in the Message Store
|
com.rabbitmq.client.Channel |
createChannel(com.rabbitmq.client.Connection connection)
Create a RabbitMQ channel from given connection
|
com.rabbitmq.client.Connection |
createConnection()
Create a RabbitMQ connection
|
void |
destroy()
This method should implement the destroying of the
implemented parts of the configuration.
|
MessageContext |
get(int index)
Return the Message in given index position
(this may depend on the implementation)
|
MessageContext |
get(java.lang.String messageId)
Get the Message with the given ID from the Message store without removing it
|
java.util.List<MessageContext> |
getAll()
Get the All messages in the Message store without removing them from the queue
|
MessageConsumer |
getConsumer()
Create a new
RabbitMQConsumer object |
MessageProducer |
getProducer()
Create a new
RabbitMQProducer object |
int |
getType()
Returns the type of this message store.
|
void |
init(SynapseEnvironment se)
This method should implement the initialization of the
implemented parts of the configuration.
|
org.apache.axis2.context.MessageContext |
newAxis2Mc() |
MessageContext |
newSynapseMc(org.apache.axis2.context.MessageContext msgCtx) |
MessageContext |
remove()
Retrieves and removes the first Message in this store.
|
MessageContext |
remove(java.lang.String messageID)
Delete and return the MessageContext with given Message id
|
addParameter, addParameterKey, dequeued, difference, enqueued, getArtifactContainerName, getDescription, getFileName, getLock, getName, getParameterKey, getParameterKeyMap, getParameters, isEdited, nextConsumerId, nextProducerId, notifyMessageAddition, notifyMessageRemoval, registerObserver, setArtifactContainerName, setDescription, setFileName, setIsEdited, setName, setParameters, size, unregisterObserver
public static final java.lang.String USERNAME
public static final java.lang.String PASSWORD
public static final java.lang.String HOST_NAME
public static final java.lang.String HOST_PORT
public static final java.lang.String VIRTUAL_HOST
public static final java.lang.String QUEUE_NAME
public static final java.lang.String ROUTING_KEY
public static final java.lang.String EXCHANGE_NAME
public static final java.lang.String RETRY_INTERVAL
public static final java.lang.String RETRY_COUNT
public static final java.lang.String PUBLISHER_CONFIRMS
public static final int DEFAULT_RETRY_INTERVAL
public static final int DEFAULT_RETRY_COUNT
public static final java.lang.String SSL_ENABLED
public static final java.lang.String SSL_KEYSTORE_LOCATION
public static final java.lang.String SSL_KEYSTORE_TYPE
public static final java.lang.String SSL_KEYSTORE_PASSWORD
public static final java.lang.String SSL_TRUSTSTORE_LOCATION
public static final java.lang.String SSL_TRUSTSTORE_TYPE
public static final java.lang.String SSL_TRUSTSTORE_PASSWORD
public static final java.lang.String SSL_VERSION
public static final java.lang.String AMQ_PREFIX
public void init(SynapseEnvironment se)
ManagedLifecycle
init
in interface ManagedLifecycle
init
in class AbstractMessageStore
se
- SynapseEnvironment to be used for initializationpublic com.rabbitmq.client.Connection createConnection()
Connection
objectpublic com.rabbitmq.client.Channel createChannel(com.rabbitmq.client.Connection connection)
connection
- a Connection
objectChannel
objectpublic void destroy()
ManagedLifecycle
destroy
in interface ManagedLifecycle
destroy
in class AbstractMessageStore
public MessageProducer getProducer()
RabbitMQProducer
objectpublic MessageConsumer getConsumer()
RabbitMQConsumer
objectpublic org.apache.axis2.context.MessageContext newAxis2Mc()
public MessageContext newSynapseMc(org.apache.axis2.context.MessageContext msgCtx)
public MessageContext remove() throws java.util.NoSuchElementException
MessageStore
java.util.NoSuchElementException
- if store is emptypublic void clear()
MessageStore
public int getType()
MessageStore
Constants.JMS_MS
, Constants.INMEMORY_MS
,
or Constants.JDBC_MS
getType
in interface MessageStore
getType
in class AbstractMessageStore
public MessageContext remove(java.lang.String messageID)
MessageStore
messageID
- message id of the Messagepublic MessageContext get(int index)
MessageStore
index
- position of the messagepublic java.util.List<MessageContext> getAll()
MessageStore
public MessageContext get(java.lang.String messageId)
MessageStore
messageId
- A message ID stringCopyright © 2005-2021 Apache Software Foundation. All Rights Reserved.