MemcachedClient mc = new XMemcachedClient(AddrUtil.getAddresses("localhost:11211"));
MessageIdCache msgIdCache = new MemcachedMessageIdCache(mc);
SimpleFetchManager.setMessageIdCache(msgIdCache);
// New session factory,ǿ�ҽ���ʹ�õ���
final MessageSessionFactory sessionFactory = new MetaMessageSessionFactory(initMetaConfig());
// subscribed topic
final String topic = "meta-test";
// consumer group
final String group = "meta-example";
// create consumer,ǿ�ҽ���ʹ�õ���
ConsumerConfig consumerConfig = new ConsumerConfig(group);
// Ĭ������ȡ�ӳ�Ϊ5�룬�������ó�100���룬�����ʵ��Ӧ��Ҫ�������á�
consumerConfig.setMaxDelayFetchTimeInMills(100);
final MessageConsumer consumer = sessionFactory.createConsumer(consumerConfig);
// subscribe topic
consumer.subscribe(topic, 1024 * 1024, new MessageListener() {
@Override
public void recieveMessages(final Message message) {