<commit_before>package com.yaoa.hibatis.mq.aliware;

import java.lang.reflect.ParameterizedType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import com.aliyun.openservices.ons.api.Action;
import com.aliyun.openservices.ons.api.ConsumeContext;
import com.aliyun.openservices.ons.api.Consumer;
import com.aliyun.openservices.ons.api.ONSFactory;
import com.yaoa.hibatis.mq.Message;
import com.yaoa.hibatis.mq.MessageChannel;
import com.yaoa.hibatis.mq.MessageListener;
import com.yaoa.hibatis.mq.MessageListenerContainer;
import com.yaoa.hibatis.serializer.Serializer;

/**
 * @author cjh
 * @version 1.0
 */
public class AliMessageListenerContainer implements InitializingBean, DisposableBean , ApplicationContextAware, MessageListenerContainer {

	private final static Log logger = LogFactory.getLog(AliMessageListenerContainer.class);

	private String topic;

	private String consumerId;
	
	private String accessKey;

	private String secretKey;

	private int consumeThreadNums;

	private Consumer consumer;

	private AliMessageProducer producer; //用来发送延迟消息的生产者<commit_msg>设置MQ消息消费默认线程数<commit_after>package com.yaoa.hibatis.mq.aliware;

import java.lang.reflect.ParameterizedType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import com.aliyun.openservices.ons.api.Action;
import com.aliyun.openservices.ons.api.ConsumeContext;
import com.aliyun.openservices.ons.api.Consumer;
import com.aliyun.openservices.ons.api.ONSFactory;
import com.yaoa.hibatis.mq.Message;
import com.yaoa.hibatis.mq.MessageChannel;
import com.yaoa.hibatis.mq.MessageListener;
import com.yaoa.hibatis.mq.MessageListenerContainer;
import com.yaoa.hibatis.serializer.Serializer;

/**
 * @author cjh
 * @version 1.0
 */
public class AliMessageListenerContainer implements InitializingBean, DisposableBean , ApplicationContextAware, MessageListenerContainer {

	private final static Log logger = LogFactory.getLog(AliMessageListenerContainer.class);

	private String topic;

	private String consumerId;
	
	private String accessKey;

	private String secretKey;

	private int consumeThreadNums = 5;

	private Consumer consumer;

	private AliMessageProducer producer; //用来发送延迟消息的生产者
{'fraction_non_alphanumeric': 0.09016393442622951, 'fraction_numerical': 0.001639344262295082, 'mean_word_length': 6.387409200968523, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6649644', 'n_tokens_mistral': 938, 'n_tokens_neox': 931, 'n_words': 172}