Y
STOMP provides an interoperable wire format so that STOMP clients can communicate with any STOMP message broker to provide easy and widespread messaging interoperability among many languages, platforms and brokers.
Size: a a a
Y
d
d
d
Y
d
d
d
d
LS
Y
Y
@Controller
public class DateEveryFiveSecController {
private final SimpMessagingTemplate template;
private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss");
@Autowired
public DateEveryFiveSecController(SimpMessagingTemplate template) {
this.template = template;
}
@Scheduled(fixedRate = 5000)
@MessageMapping("/time")
@SendTo("/topic/date")
public void increment() {
String format = dateFormat.format(new Date());
template.convertAndSend("/topic/date", format);
}
}
A
Э
Y
D
Э
A
Y
VA