Local environment:
there are two channel: testchannel1, testchannel2, under testtopic Consume data to http interface via nsq_to_http
e.g:
Consumer 1:
/ usr/local/opt/nsq/bin/nsq_to_http-- topic=testtopic-- channel=testchannel1-- lookupd-http-address=127.0.0.1:4161-- post= http://xx.xx.xx/index.php?typ.-- content-type=application / x-www-form-urlencoded
Consumer 2:
/ usr/local/opt/nsq/bin/nsq_to_http-- topic=testtopic-- channel=testchannel2-- lookupd-http-address=127.0.0.1:4161-- post= http://xx.xx.xx/index.php?typ.-- content-type=application/x-www-form-urlencoded
Test execution:
curl-d "hello=world&a=1"" http://127.0.0.1:4151/pub topic=testtopic&channel=testchannel1"
result:
http://xx.xx.xx/index.php can receive a request from type=consumer2
question:
No matter which channel I push the data, my two consumers will receive the data from my colleagues. Then my business logic is out of order. I don"t understand how nsq uses multiple channel. I know it should be my problem, so please give me some advice on how to consume only the data under a particular channel?