Package core.apiCore.interfaces
Class RabbitMqInterface
java.lang.Object
core.apiCore.interfaces.RabbitMqInterface
public class RabbitMqInterface extends Object
- Author:
- ehsan.matean
-
Field Summary
Fields Modifier and Type Field Description static com.rabbitmq.client.Channelchannelstatic com.rabbitmq.client.Connectionconnectionstatic StringRABBIT_MQ_DECLARE_QUEUEstatic StringRABBIT_MQ_EXCHANGEstatic StringRABBIT_MQ_EXCHANGE_TYPEstatic StringRABBIT_MQ_HOSTstatic StringRABBIT_MQ_MESSAGE_ID_PREFIXstatic StringRABBIT_MQ_OUTBOUND_EXCHANGEstatic StringRABBIT_MQ_OUTBOUND_QUEUEstatic StringRABBIT_MQ_PASSstatic StringRABBIT_MQ_PORTstatic StringRABBIT_MQ_QUEUEstatic StringRABBIT_MQ_QUEUE_DURABLEstatic StringRABBIT_MQ_USERstatic StringRABBIT_MQ_VIRTUAL_HOST -
Constructor Summary
Constructors Constructor Description RabbitMqInterface() -
Method Summary
Modifier and Type Method Description static voidcloseConnection()close connectionstatic voidconnectRabbitMq(ServiceObject serviceObject)static voidevaluateOption(ServiceObject serviceObject)static com.rabbitmq.client.AMQP.BasicPropertiesevaluateRequestHeaders(ServiceObject serviceObject)static voidgetBatchMessages(String queueName, int maxMessages)attempt to get a number of messages from the queuestatic voidgetOutboundMessages()gets message from outbound queue Adds messages to ouboutMessage hashmapstatic voidsendRabbitMqMessage(ServiceObject serviceObject, String messageId)send rabbitMq messagestatic voidtestRabbitMqInterface(ServiceObject serviceObject)interface for database calls
-
Field Details
-
RABBIT_MQ_HOST
- See Also:
- Constant Field Values
-
RABBIT_MQ_PORT
- See Also:
- Constant Field Values
-
RABBIT_MQ_VIRTUAL_HOST
- See Also:
- Constant Field Values
-
RABBIT_MQ_USER
- See Also:
- Constant Field Values
-
RABBIT_MQ_PASS
- See Also:
- Constant Field Values
-
RABBIT_MQ_EXCHANGE
- See Also:
- Constant Field Values
-
RABBIT_MQ_OUTBOUND_EXCHANGE
- See Also:
- Constant Field Values
-
RABBIT_MQ_EXCHANGE_TYPE
- See Also:
- Constant Field Values
-
RABBIT_MQ_QUEUE
- See Also:
- Constant Field Values
-
RABBIT_MQ_OUTBOUND_QUEUE
- See Also:
- Constant Field Values
-
RABBIT_MQ_QUEUE_DURABLE
- See Also:
- Constant Field Values
-
RABBIT_MQ_DECLARE_QUEUE
- See Also:
- Constant Field Values
-
RABBIT_MQ_MESSAGE_ID_PREFIX
- See Also:
- Constant Field Values
-
connection
public static com.rabbitmq.client.Connection connection -
channel
public static com.rabbitmq.client.Channel channel
-
-
Constructor Details
-
RabbitMqInterface
public RabbitMqInterface()
-
-
Method Details
-
testRabbitMqInterface
interface for database calls- Parameters:
serviceObject-- Throws:
Exception
-
connectRabbitMq
- Throws:
Exception
-
sendRabbitMqMessage
send rabbitMq message- Parameters:
apiObject-
-
evaluateRequestHeaders
public static com.rabbitmq.client.AMQP.BasicProperties evaluateRequestHeaders(ServiceObject serviceObject) -
evaluateOption
-
closeConnection
public static void closeConnection()close connection -
getOutboundMessages
gets message from outbound queue Adds messages to ouboutMessage hashmap- Parameters:
receiver-- Throws:
Exception
-
getBatchMessages
attempt to get a number of messages from the queue- Parameters:
queueName-maxMessages-- Throws:
Exception
-