use of org.apache.synapse.message.store.impl.rabbitmq.RabbitMQStore in project wso2-synapse by wso2.
the class RabbitMQStoreTest method init.
@BeforeClass
public static void init() throws NoSuchFieldException {
rabbitMQStore = new RabbitMQStore();
// Accessing private variable using reflection
connectionFactory = RabbitMQStore.class.getDeclaredField("connectionFactory");
connectionFactory.setAccessible(true);
// Setting parameters of the RabbitMQStore
Map<String, Object> temp = new HashMap<>();
temp.put(RabbitMQStore.USERNAME, USERNAME);
temp.put(RabbitMQStore.PASSWORD, PASSWORD);
temp.put(RabbitMQStore.HOST_NAME, HOST);
temp.put(RabbitMQStore.HOST_PORT, PORT);
temp.put(RabbitMQStore.VIRTUAL_HOST, VIRTUAL_HOST);
temp.put(RabbitMQStore.QUEUE_NAME, QUEUE);
rabbitMQStore.setParameters(temp);
AxisConfiguration axisConfiguration = new AxisConfiguration();
configurationContext = new ConfigurationContext(axisConfiguration);
SynapseConfiguration synapseConfiguration = new SynapseConfiguration();
Axis2SynapseEnvironment env = new Axis2SynapseEnvironment(configurationContext, synapseConfiguration);
rabbitMQStore.init(env);
}
Aggregations