注释 nsq
This commit is contained in:
parent
b58d3a7cf0
commit
db504fb664
|
|
@ -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());
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue