예제 #1
0
 @Override
 public void disconnect(long consumerId, String queueName) {
   StompSubscription stompSubscription = subscriptions.remove(consumerId);
   if (stompSubscription != null) {
     StompFrame frame =
         connection.getFrameHandler().createStompFrame(StompCommands.ERROR.toString());
     try {
       frame.setBody("consumer with ID " + consumerId + " disconnected by server");
       connection.sendFrame(frame);
     } catch (UnsupportedEncodingException e) {
       HornetQServerLogger.LOGGER.errorEncodingStompPacket(e);
     }
   }
 }