connection.start();
    public void afterPropertiesSet() throws Exception {        if (template == null) {            throw new IllegalArgumentException("Must have a template set");        }        template.execute(new SessionCallback() {            public Object doInJms(Session session) throws JMSException {                Destination defaultDestination = template.getDefaultDestination();                if (defaultDestination == null) {                    defaultDestination = template.getDestinationResolver().resolveDestinationName(session,                            template.getDefaultDestinationName(), template.isPubSubDomain());                }                consumer = session.createConsumer(defaultDestination, selector);                return null;            }        }, true);        consumer.setMessageListener(this);    }