InetAddress.getByName(brokerInfo.getHeartbeatHostAddress()),
brokerInfo.getHeartbeatPort());
//my heartbeat pkt
HeartbeatInfo hbi = HeartbeatInfo.newInstance();
HAClusteredBroker lcb = (HAClusteredBroker)clsmgr.getLocalBroker();
hbi.setBrokerID(lcb.getBrokerName());
hbi.setBrokerSession(lcb.getBrokerSessionUID().longValue());
hbi.setBrokerAddress((BrokerMQAddress)lcb.getBrokerURL());
hbi.setToBrokerID(cb.getBrokerName());
hbi.setToBrokerSession(brokerSession.longValue());
hbi.setSequence(0);
hbe.gp = hbi.getGPacket();
//calculate length for receiving
hbi = HeartbeatInfo.newInstance();
hbi.setBrokerID(cb.getBrokerName());
hbi.setBrokerSession(brokerSession.longValue());
hbi.setBrokerAddress((BrokerMQAddress)cb.getBrokerURL());
hbi.setToBrokerID(lcb.getBrokerName());
hbi.setToBrokerSession(lcb.getBrokerSessionUID().longValue());
hbe.dataLength = HeartbeatInfo.toByteArray(hbi.getGPacket()).length;
hbe.heartbeatInterval = brokerInfo.getHeartbeatInterval();
hbe.lastTimestamp = System.currentTimeMillis();
hbe.lastSequence = 0;