use of org.apache.rocketmq.connect.jms.Replicator in project rocketmq-externals by apache.
the class RabbitmqSourceTaskTest method getPatternProcessor.
public void getPatternProcessor(Replicator replicator) {
KeyValue kv = new DefaultKeyValue();
kv.put("rabbitmqUrl", "amqp://112.74.48.251:5672");
kv.put("rabbitmqUsername", "admin");
kv.put("rabbitmqPassword", "admin");
kv.put("destinationType", "queue");
kv.put("destinationName", "test-queue");
RabbitmqConfig config = new RabbitmqConfig();
config.load(kv);
replicator = new Replicator(config, null);
RabbitmqSourceTask task = new RabbitmqSourceTask();
assertEquals(RabbitMQPatternProcessor.class, task.getPatternProcessor(replicator).getClass());
}
use of org.apache.rocketmq.connect.jms.Replicator in project rocketmq-externals by apache.
the class RabbitMQPatternProcessorTest method connectionFactory.
@Test
public void connectionFactory() {
RabbitmqConfig rabbitmqConfig = new RabbitmqConfig();
rabbitmqConfig.setRabbitmqUrl("amqp://112.74.48.251:5672");
Replicator replicator = new Replicator(rabbitmqConfig, null);
RabbitMQPatternProcessor patternProcessor = new RabbitMQPatternProcessor(replicator);
assertEquals(RMQConnectionFactory.class, patternProcessor.connectionFactory().getClass());
}
Aggregations