홈페이지 https://nsq.io/
분산 배치처리를 위한 Message Que 서비스
사용법 및 서버에 설치 방법
https://nsq.io/deployment/installing.html
PowerShell
start-process .\nsqlookupd -WindowStyle Hidden
start-process .\nsqd -ArgumentList "-lookupd-tcp-address localhost:4160" -WindowStyle Hidden
start-process .\nsqadmin -ArgumentList "--lookupd-http-address localhost:4161" -WindowStyle Hidden
//서비스 확인
Get-Process -Name ns*
//서비스 죽이기
Stop-Process -Name "nsqadmin
c# source
//삽입
var prod = new NsqProducer(aim.NsqAddress, aim.NsqPort.ToInt());
await prod.PublishAsync(nsm.TopicName, JsonConvert.SerializeObject(nsm));
//읽기
string nsqformat = $"lookupd={aim.NsqAddress}:{aim.NsqClientPort}; topic={NSQTopic.PRODUCTAPPROVAL.ToString()}; channel={aim.NsqCahnnel}";
var cons = NsqConsumer.Create(nsqformat);
await cons.ConnectAndWaitAsync(Handler);
await cons.SetMaxInFlightAsync(1);