public class RabbitMQStore extends AbstractMessageStore
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PORT
RabbitMQ Server default port
|
static String |
EXCHANGE_NAME
RabbitMQ exchange.
|
static String |
HOST_NAME
RabbitMQ Server Host name
|
static String |
HOST_PORT
RabbitMQ Server Port
|
static String |
PASSWORD
RabbitMQ Broker password
|
static String |
QUEUE_NAME
RabbitMQ queue name that this message store must store the messages to.
|
static String |
ROUTE_KEY
RabbitMQ route key which queue is binded
|
static String |
SSL_ENABLED |
static String |
SSL_KEYSTORE_LOCATION |
static String |
SSL_KEYSTORE_PASSWORD |
static String |
SSL_KEYSTORE_TYPE |
static String |
SSL_TRUSTSTORE_LOCATION |
static String |
SSL_TRUSTSTORE_PASSWORD |
static String |
SSL_TRUSTSTORE_TYPE |
static String |
SSL_VERSION |
static String |
USERNAME
RabbitMQ Broker username
|
static String |
VIRTUAL_HOST
RabbitMQ Server Virtual Host
|
description, fileName, lock, messageStoreMBean, messageStoreObservers, name, parameterKeyMap, parameters, sequence, synapseConfiguration, synapseEnvironment| Constructor and Description |
|---|
RabbitMQStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cleanup(com.rabbitmq.client.Connection connection,
boolean error)
Cleans up the RabbitMQ Connection
|
void |
clear()
Delete all the Messages in the Message Store
|
boolean |
closeConnection(com.rabbitmq.client.Connection connection)
Close any given connection
|
boolean |
closeProducerConnection()
Closes the existing RabbitMQ message producer 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(String messageId)
Get the Message with the given ID from the Message store without removing it
|
List<MessageContext> |
getAll()
Get the All messages in the Message store without removing them from the queue
|
MessageConsumer |
getConsumer()
Returns a Message Consumer for this message store.
|
MessageProducer |
getProducer()
Returns a Message Producer for this message store.
|
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() |
boolean |
newProducerConnection()
Create a new message producer connection, if there is an existing connection close it and
create a new connection
|
MessageContext |
newSynapseMc(org.apache.axis2.context.MessageContext msgCtx) |
com.rabbitmq.client.Connection |
producerConnection() |
MessageContext |
remove()
Retrieves and removes the first Message in this store.
|
MessageContext |
remove(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, unregisterObserverpublic static final String USERNAME
public static final String PASSWORD
public static final String HOST_NAME
public static final String HOST_PORT
public static final int DEFAULT_PORT
public static final String VIRTUAL_HOST
public static final String QUEUE_NAME
public static final String ROUTE_KEY
public static final String EXCHANGE_NAME
public static final String SSL_ENABLED
public static final String SSL_KEYSTORE_LOCATION
public static final String SSL_KEYSTORE_TYPE
public static final String SSL_KEYSTORE_PASSWORD
public static final String SSL_TRUSTSTORE_LOCATION
public static final String SSL_TRUSTSTORE_TYPE
public static final String SSL_TRUSTSTORE_PASSWORD
public static final String SSL_VERSION
public void init(SynapseEnvironment se)
ManagedLifecycleinit in interface ManagedLifecycleinit in class AbstractMessageStorese - SynapseEnvironment to be used for initializationpublic boolean newProducerConnection()
public void destroy()
ManagedLifecycledestroy in interface ManagedLifecycledestroy in class AbstractMessageStorepublic boolean closeConnection(com.rabbitmq.client.Connection connection)
connection - public boolean closeProducerConnection()
public MessageProducer getProducer()
MessageStorepublic MessageConsumer getConsumer()
MessageStorepublic org.apache.axis2.context.MessageContext newAxis2Mc()
public MessageContext newSynapseMc(org.apache.axis2.context.MessageContext msgCtx)
public com.rabbitmq.client.Connection producerConnection()
public MessageContext remove() throws NoSuchElementException
MessageStoreNoSuchElementException - if store is emptypublic void clear()
MessageStorepublic int getType()
MessageStoreConstants.JMS_MS, Constants.INMEMORY_MS,
or Constants.JDBC_MSgetType in interface MessageStoregetType in class AbstractMessageStorepublic MessageContext remove(String messageID)
MessageStoremessageID - message id of the Messagepublic MessageContext get(int index)
MessageStoreindex - position of the messagepublic List<MessageContext> getAll()
MessageStorepublic MessageContext get(String messageId)
MessageStoremessageId - A message ID stringpublic boolean cleanup(com.rabbitmq.client.Connection connection,
boolean error)
connection - RabbitMQ Connectionerror - is this method called upon an errortrue if the cleanup is successful. false otherwise.Copyright © 2005–2019 Apache Software Foundation. All rights reserved.