注释 nsq

This commit is contained in:
GYJ 2025-01-09 17:17:36 +08:00
parent b58d3a7cf0
commit db504fb664
1 changed files with 14 additions and 14 deletions

View File

@ -12,18 +12,18 @@ import javax.annotation.PostConstruct;
@Service
@Slf4j
public class NsqConfig {
/**
* 端口号
*/
@Value("${nsq.port}")
private int port;
@Value("${nsq.address}")
private String address;
@PostConstruct
public void startNSQChannel() {
new NSQConsumers(address, port, "test", "ch1", new Print2MessageHandlerAdapter());
new NSQConsumers(address, port, "test", "ch2", new PrintMessageHandlerAdapter());
}
// /**
// * 端口号
// */
// @Value("${nsq.port}")
// private int port;
//
// @Value("${nsq.address}")
// private String address;
//
// @PostConstruct
// public void startNSQChannel() {
// new NSQConsumers(address, port, "test", "ch1", new Print2MessageHandlerAdapter());
// new NSQConsumers(address, port, "test", "ch2", new PrintMessageHandlerAdapter());
// }
}