String subscrReceiptId = "001";
String disconReceiptId = "002";
switch (frame.command()) {
case CONNECTED:
StompFrame subscribeFrame = new DefaultStompFrame(StompCommand.SUBSCRIBE);
subscribeFrame.headers().set(StompHeaders.DESTINATION, StompClient.TOPIC);
subscribeFrame.headers().set(StompHeaders.RECEIPT, subscrReceiptId);
subscribeFrame.headers().set(StompHeaders.ID, "1");
System.out.println("connected, sending subscribe frame: " + subscribeFrame);
state = ClientState.AUTHENTICATED;
ctx.writeAndFlush(subscribeFrame);