private void publishData(String path,byte[] data){
  try {
    if (data != null && data.length > 0) {
      ByteArrayInputStream bii=new ByteArrayInputStream(data);
      ObjectInputStream ois=new ObjectInputStream(bii);
      Object dataObj=ois.readObject();
      ZooKeeperDataWrapper wrapper=(ZooKeeperDataWrapper)(dataObj);
      JetstreamMessage tm=(JetstreamMessage)wrapper.getOrginalData();
      String trackerKey=createKey(path,wrapper);
      m_changeTracker.put(trackerKey,wrapper.getTimestamp());
      try {
        LOGGER.warn("Publishing the change for topic :" + path + " TrackerKey :"+ trackerKey+ " Timestamp : "+ wrapper.getTimestamp());
        m_transportListener.postMessage(tm,m_queueStats);
      }
 catch (      Throwable mse) {
        StringBuffer buf=new StringBuffer();
        buf.append("Error dispatching to message service - ");
        buf.append(mse.getLocalizedMessage());
        LOGGER.error("Exception publishing data for path :" + path + buf.toString(),mse);
      }
      m_totalMsgsRcvd.increment();
      m_msgsRcvdPerSec.increment();
    }
  }
 catch (  ClassNotFoundException e) {
    LOGGER.error(" ClassNotFoundException while publishing data to transport Listener :" + path,e);
  }
catch (  IOException e) {
    LOGGER.error(" IOException while publishing data to transport Listener :" + path,e);
  }
}

private void publishData ( String path , byte [ ] data ) { try { if ( data != null && data . length > 0 ) { ByteArrayInputStream bii = new ByteArrayInputStream ( data ) ; ObjectInputStream ois = new ObjectInputStream ( bii ) ; Object dataObj = ois . readObject ( ) ; ZooKeeperDataWrapper wrapper = ( ZooKeeperDataWrapper ) ( dataObj ) ; JetstreamMessage tm = ( JetstreamMessage ) wrapper . getOrginalData ( ) ; String trackerKey = createKey ( path , wrapper ) ; m_changeTracker . put ( trackerKey , wrapper . getTimestamp ( ) ) ; try { LOGGER . warn ( "Publishing the change for topic :" + path + " TrackerKey :" + trackerKey + " Timestamp : " + wrapper . getTimestamp ( ) ) ; m_transportListener . postMessage ( tm , m_queueStats ) ; } catch ( Throwable mse ) { StringBuffer buf = new StringBuffer ( ) ; buf . append ( "Error dispatching to message service - " ) ; buf . append ( mse . getLocalizedMessage ( ) ) ; LOGGER . error ( "Exception publishing data for path :" + path + buf . toString ( ) , mse ) ; } m_totalMsgsRcvd . increment ( ) ; m_msgsRcvdPerSec . increment ( ) ; } } catch ( ClassNotFoundException e ) { LOGGER . error ( " ClassNotFoundException while publishing data to transport Listener :" + path , e ) ; } catch ( IOException e ) { LOGGER . error ( " IOException while publishing data to transport Listener :" + path , e ) ; } }
post notifications on to transport listeners
