org.apache.rocketmq.test.listener.AbstractListener Java Examples

The following examples show how to use org.apache.rocketmq.test.listener.AbstractListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractMQConsumer.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public AbstractMQConsumer(String nsAddr, String topic, String subExpression,
    String consumerGroup, AbstractListener listener) {
    this.topic = topic;
    this.subExpression = subExpression;
    this.consumerGroup = consumerGroup;
    this.listener = listener;
    this.nsAddr = nsAddr;
}
 
Example #2
Source File: ConsumerFactory.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
public static RMQSqlConsumer getRMQSqlConsumer(String nsAddr, String consumerGroup,
    String topic, MessageSelector selector,
    AbstractListener listner) {
    RMQSqlConsumer consumer = new RMQSqlConsumer(nsAddr, topic, selector,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #3
Source File: ConsumerFactory.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getRMQNormalConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = new RMQNormalConsumer(nsAddr, topic, subExpression,
        consumerGroup, listener);
    consumer.create(useTLS);
    consumer.start();
    return consumer;
}
 
Example #4
Source File: BaseBroadCastIT.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = ConsumerFactory.getRMQBroadCastConsumer(nsAddr,
        consumerGroup, topic, subExpression, listner);

    consumer.setDebug();

    mqClients.add(consumer);
    logger.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #5
Source File: ConsumerFactory.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getRMQBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = new RMQBroadCastConsumer(nsAddr, topic, subExpression,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #6
Source File: ConsumerFactory.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQSqlConsumer getRMQSqlConsumer(String nsAddr, String consumerGroup,
    String topic, MessageSelector selector,
    AbstractListener listner) {
    RMQSqlConsumer consumer = new RMQSqlConsumer(nsAddr, topic, selector,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #7
Source File: AbstractMQConsumer.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public AbstractMQConsumer(String nsAddr, String topic, String subExpression,
    String consumerGroup, AbstractListener listener) {
    this.topic = topic;
    this.subExpression = subExpression;
    this.consumerGroup = consumerGroup;
    this.listener = listener;
    this.nsAddr = nsAddr;
}
 
Example #8
Source File: BaseConf.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getConsumer(String nsAddr, String consumerGroup, String topic,
    String subExpression, AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = ConsumerFactory.getRMQNormalConsumer(nsAddr, consumerGroup,
        topic, subExpression, listener, useTLS);
    if (debug) {
        consumer.setDebug();
    }
    mqClients.add(consumer);
    log.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #9
Source File: ConsumerFactory.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getRMQBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = new RMQBroadCastConsumer(nsAddr, topic, subExpression,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #10
Source File: AbstractMQConsumer.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
public AbstractMQConsumer(String nsAddr, String topic, String subExpression,
    String consumerGroup, AbstractListener listener) {
    this.topic = topic;
    this.subExpression = subExpression;
    this.consumerGroup = consumerGroup;
    this.listener = listener;
    this.nsAddr = nsAddr;
}
 
Example #11
Source File: BaseConf.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getConsumer(String nsAddr, String consumerGroup, String topic,
    String subExpression, AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = ConsumerFactory.getRMQNormalConsumer(nsAddr, consumerGroup,
        topic, subExpression, listener, useTLS);
    if (debug) {
        consumer.setDebug();
    }
    mqClients.add(consumer);
    log.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #12
Source File: BaseBroadCastIT.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = ConsumerFactory.getRMQBroadCastConsumer(nsAddr,
        consumerGroup, topic, subExpression, listner);

    consumer.setDebug();

    mqClients.add(consumer);
    logger.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #13
Source File: BaseConf.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getConsumer(String nsAddr, String consumerGroup, String topic,
    String subExpression, AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = ConsumerFactory.getRMQNormalConsumer(nsAddr, consumerGroup,
        topic, subExpression, listener, useTLS);
    if (debug) {
        consumer.setDebug();
    }
    mqClients.add(consumer);
    log.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #14
Source File: BaseBroadCastIT.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = ConsumerFactory.getRMQBroadCastConsumer(nsAddr,
        consumerGroup, topic, subExpression, listner);

    consumer.setDebug();

    mqClients.add(consumer);
    logger.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #15
Source File: ConsumerFactory.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getRMQNormalConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = new RMQNormalConsumer(nsAddr, topic, subExpression,
        consumerGroup, listener);
    consumer.create(useTLS);
    consumer.start();
    return consumer;
}
 
Example #16
Source File: ConsumerFactory.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getRMQBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = new RMQBroadCastConsumer(nsAddr, topic, subExpression,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #17
Source File: ConsumerFactory.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
public static RMQSqlConsumer getRMQSqlConsumer(String nsAddr, String consumerGroup,
    String topic, MessageSelector selector,
    AbstractListener listner) {
    RMQSqlConsumer consumer = new RMQSqlConsumer(nsAddr, topic, selector,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #18
Source File: AbstractMQConsumer.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
public AbstractMQConsumer(String nsAddr, String topic, String subExpression,
    String consumerGroup, AbstractListener listener) {
    this.topic = topic;
    this.subExpression = subExpression;
    this.consumerGroup = consumerGroup;
    this.listener = listener;
    this.nsAddr = nsAddr;
}
 
Example #19
Source File: BaseConf.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getConsumer(String nsAddr, String consumerGroup, String topic,
    String subExpression, AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = ConsumerFactory.getRMQNormalConsumer(nsAddr, consumerGroup,
        topic, subExpression, listener, useTLS);
    if (debug) {
        consumer.setDebug();
    }
    mqClients.add(consumer);
    log.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #20
Source File: BaseBroadCastIT.java    From rocketmq-read with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = ConsumerFactory.getRMQBroadCastConsumer(nsAddr,
        consumerGroup, topic, subExpression, listner);

    consumer.setDebug();

    mqClients.add(consumer);
    logger.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #21
Source File: ConsumerFactory.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getRMQNormalConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQNormalConsumer consumer = new RMQNormalConsumer(nsAddr, topic, subExpression,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #22
Source File: ConsumerFactory.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getRMQBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = new RMQBroadCastConsumer(nsAddr, topic, subExpression,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #23
Source File: AbstractMQConsumer.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
public AbstractMQConsumer(String nsAddr, String topic, String subExpression,
    String consumerGroup, AbstractListener listner) {
    this.topic = topic;
    this.subExpression = subExpression;
    this.consumerGroup = consumerGroup;
    this.listner = listner;
    this.nsAddr = nsAddr;
}
 
Example #24
Source File: BaseConf.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getConsumer(String nsAddr, String consumerGroup, String topic,
    String subExpression, AbstractListener listner) {
    RMQNormalConsumer consumer = ConsumerFactory.getRMQNormalConsumer(nsAddr, consumerGroup,
        topic, subExpression, listner);
    if (debug) {
        consumer.setDebug();
    }
    mqClients.add(consumer);
    log.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #25
Source File: BaseBroadCastIT.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = ConsumerFactory.getRMQBroadCastConsumer(nsAddr,
        consumerGroup, topic, subExpression, listner);

    consumer.setDebug();

    mqClients.add(consumer);
    logger.info(String.format("consumer[%s] start,topic[%s],subExpression[%s]", consumerGroup,
        topic, subExpression));
    return consumer;
}
 
Example #26
Source File: ConsumerFactory.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getRMQNormalConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = new RMQNormalConsumer(nsAddr, topic, subExpression,
        consumerGroup, listener);
    consumer.create(useTLS);
    consumer.start();
    return consumer;
}
 
Example #27
Source File: ConsumerFactory.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQBroadCastConsumer getRMQBroadCastConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listner) {
    RMQBroadCastConsumer consumer = new RMQBroadCastConsumer(nsAddr, topic, subExpression,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #28
Source File: ConsumerFactory.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQSqlConsumer getRMQSqlConsumer(String nsAddr, String consumerGroup,
    String topic, MessageSelector selector,
    AbstractListener listner) {
    RMQSqlConsumer consumer = new RMQSqlConsumer(nsAddr, topic, selector,
        consumerGroup, listner);
    consumer.create();
    consumer.start();
    return consumer;
}
 
Example #29
Source File: ConsumerFactory.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public static RMQNormalConsumer getRMQNormalConsumer(String nsAddr, String consumerGroup,
    String topic, String subExpression,
    AbstractListener listener, boolean useTLS) {
    RMQNormalConsumer consumer = new RMQNormalConsumer(nsAddr, topic, subExpression,
        consumerGroup, listener);
    consumer.create(useTLS);
    consumer.start();
    return consumer;
}
 
Example #30
Source File: RMQNormalConsumer.java    From rocketmq with Apache License 2.0 4 votes vote down vote up
public RMQNormalConsumer(String nsAddr, String topic, String subExpression,
    String consumerGroup, AbstractListener listner) {
    super(nsAddr, topic, subExpression, consumerGroup, listner);
}