com.aliyun.openservices.ons.api.exactlyonce.ExactlyOnceFactoryImpl Maven / Gradle / Ivy
package com.aliyun.openservices.ons.api.exactlyonce;
import java.util.Properties;
import com.aliyun.openservices.shade.com.alibaba.rocketmq.client.retry.DefaultConsumerRetryStrategy;
import com.aliyun.openservices.shade.com.alibaba.rocketmq.client.retry.RetryStrategy;
import com.aliyun.openservices.ons.api.impl.ONSFactoryImpl;
import com.aliyun.openservices.ons.api.impl.rocketmq.ONSUtil;
public class ExactlyOnceFactoryImpl extends ONSFactoryImpl implements ExactlyOnceONSFactoryAPI {
@Override
public ExactlyOnceConsumer createExactlyOnceConsumer(Properties properties) {
return createExactlyOnceConsumer(properties, new DefaultConsumerRetryStrategy());
}
@Override
public ExactlyOnceConsumer createExactlyOnceConsumer(Properties properties,
RetryStrategy retryStrategy) {
return new ExactlyOnceConsumerImpl(ONSUtil.extractProperties(properties), retryStrategy);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy