package com.goafanti.easemob.queue;

import org.springframework.beans.factory.annotation.Autowired;

import com.goafanti.easemob.EasemobUtils;
import com.goafanti.easemob.bo.EasemobInfo;

public class EasemobRedisQueueListener implements RedisQueueListener<EasemobInfo> {
	@Autowired
	EasemobUtils easemobUtils;

	@Override
	public void onMessage(EasemobInfo value) {
		if (value.getTryCount() < 3) {
			easemobUtils.sendAsync(value);
		}
	}

}
