if (demand) {
try {
producers = new HashMap<Destination, Object>();
advisories = new ArrayList<ConsumerEventSource>();
for (TopicExpressionType topic : this.topic) {
ConsumerEventSource advisory
= new ConsumerEventSource(connection, topicConverter.toActiveMQTopic(topic));
advisory.setConsumerListener(this);
advisory.start();
advisories.add(advisory);
}
} catch (Exception e) {
PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
throw new PublisherRegistrationFailedFault("Error starting demand-based publisher", fault, e);