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) {
System.out.println("Receive message " + new String(message.getData()));
}