I wanted to send the messages from server to client only for particular users because the messages are specific to users , does the below sample work
bus.subscribe("user_name_messages", new MessageCallback() { public void callback(CommandMessage message) { /* * When a message arrives, extract the "text" field and * do something with it */ String messageText = message.get(String.class, "text"); } });
where user_name_messages == user_name is dynamic which is specific to user.