/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.stratos.cloud.controller.topology;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.stratos.messaging.event.instance.status.InstanceActivatedEvent;
import org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent;
import org.apache.stratos.messaging.util.Constants;
import org.apache.stratos.messaging.util.Util;

import javax.jms.TextMessage;

public class TopologyEventMessageDelegator implements Runnable {
    private static final Log log = LogFactory.getLog(TopologyEventMessageDelegator.class);

     @Override
    public void run() {
		log.info("Topology event message processor started");

        while (true) {
			try {
				TextMessage message = TopologyManager.getInstance().getSharedTopologyDiffQueue().take();

				// retrieve the header
				String type = message.getStringProperty(Constants.EVENT_CLASS_NAME);
				// retrieve the actual message
				String json = message.getText();

                log.info(String.format("Event message received from queue: %s", type));

                if(InstanceStartedEvent.class.getName().equals(type)) {
                     TopologyBuilder.handleMemberStarted((InstanceStartedEvent)Util.
                                                        jsonToObject(json, InstanceStartedEvent.class));
                } else if(InstanceActivatedEvent.class.getName().equals(type)) {
                     TopologyBuilder.handleMemberActivated((InstanceActivatedEvent) Util.
                                                        jsonToObject(json, InstanceActivatedEvent.class));
                }

				if (log.isDebugEnabled()) {
					log.debug(String.format("Event message received from queue: %s", type));
				}
            } catch (Exception e) {
                String error = "Failed to retrieve the topology event message.";
            	log.error(error, e);
            	// Commenting throwing the error. Otherwise thread will not execute if an exception is thrown.
            	//throw new RuntimeException(error, e);
            }
        }
    }
}

@@ -2434,16 +2434,148 @@
        %7D
+ else%7B%0A                %09log.warn(%22Event message received is not InstanceStartedEvent or InstanceActivatedEvent%22 );%0A                %7D
 %0A%0A%09%09%09%09if

Add a warning if the received event is not InstanceStartedEvent or InstanceActivatedEvent