public void run() 
	   {
		
		 while(Project1.applicationRunning){
			 /**
			  * Highest Priority is to send Clock Replies.
			  * So sending them first.
			  */
			while(!sendClockReplyQueue.isEmpty()){
				Message toSend=sendClockReplyQueue.poll();
				 //System.out.println(toSend.getRecieverAddress()+String.valueOf(toSend.getRecieverPort()));
				 int destNodeID=Project1.mapNodesByAddress.get(toSend.getRecieverAddress()+toSend.getRecieverPort()).getNodeID();
				// toSend.setMessageId(this.getUnicastMessageID(Project1.nodeID,destNodeID));
				 sendMessage(Project1.mapNodesByAddress.get(toSend.getRecieverAddress()+String.valueOf(toSend.getRecieverPort())).getNodeID(),toSend);
			}
			/**
			  * Second Highest Priority is to send MAx Clock Replies.
			  * So sending them second.
			  */
			while(!sendMaxClock.isEmpty()){
				MultiCastMessage objMulti=sendMaxClock.poll();
				for(Message msg:objMulti.getMessages()){
					//msg.setMessageId(this.getMulticastMessageIDMaxClock(Project1.nodeID));
					 sendMessage(Project1.mapNodesByAddress.get(msg.getRecieverAddress()+String.valueOf(msg.getRecieverPort())).getNodeID(),msg);					 
				 }
			}
			 while(!sendQueue.isEmpty() && Project1.getClockReplies()==0){
				 MultiCastMessage objMulti= sendQueue.poll();
				 
				 String id=this.getMulticastMessageID(Project1.nodeID);
				 LC.incrementValue();
				 for(Message msg:objMulti.getMessages()){
					 msg.setMessageId(id);
					 msg.setLogicalClockValue(LC.getValue());
					 sendMessage(Project1.mapNodesByAddress.get(msg.getRecieverAddress()+String.valueOf(msg.getRecieverPort())).getNodeID(),msg);
					 Project1.incrementClockReplies();
				 }
			 }	 
		 }
		 System.out.println("Quitting");
	   }