注释 nsq
This commit is contained in:
parent
b58d3a7cf0
commit
db504fb664
|
|
@ -12,18 +12,18 @@ import javax.annotation.PostConstruct;
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class NsqConfig {
|
public class NsqConfig {
|
||||||
/**
|
// /**
|
||||||
* 端口号
|
// * 端口号
|
||||||
*/
|
// */
|
||||||
@Value("${nsq.port}")
|
// @Value("${nsq.port}")
|
||||||
private int port;
|
// private int port;
|
||||||
|
//
|
||||||
@Value("${nsq.address}")
|
// @Value("${nsq.address}")
|
||||||
private String address;
|
// private String address;
|
||||||
|
//
|
||||||
@PostConstruct
|
// @PostConstruct
|
||||||
public void startNSQChannel() {
|
// public void startNSQChannel() {
|
||||||
new NSQConsumers(address, port, "test", "ch1", new Print2MessageHandlerAdapter());
|
// new NSQConsumers(address, port, "test", "ch1", new Print2MessageHandlerAdapter());
|
||||||
new NSQConsumers(address, port, "test", "ch2", new PrintMessageHandlerAdapter());
|
// new NSQConsumers(address, port, "test", "ch2", new PrintMessageHandlerAdapter());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue