{"action":"opened","issue":{"url":"https://api.github.com/repos/nsqio/go-nsq/issues/187","repository_url":"https://api.github.com/repos/nsqio/go-nsq","labels_url":"https://api.github.com/repos/nsqio/go-nsq/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/nsqio/go-nsq/issues/187/comments","events_url":"https://api.github.com/repos/nsqio/go-nsq/issues/187/events","html_url":"https://github.com/nsqio/go-nsq/issues/187","id":170360684,"number":187,"title":"How to read from NSQ faster","user":{"login":"AnotherGoogleFans","id":6881899,"avatar_url":"https://avatars.githubusercontent.com/u/6881899?v=3","gravatar_id":"","url":"https://api.github.com/users/AnotherGoogleFans","html_url":"https://github.com/AnotherGoogleFans","followers_url":"https://api.github.com/users/AnotherGoogleFans/followers","following_url":"https://api.github.com/users/AnotherGoogleFans/following{/other_user}","gists_url":"https://api.github.com/users/AnotherGoogleFans/gists{/gist_id}","starred_url":"https://api.github.com/users/AnotherGoogleFans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnotherGoogleFans/subscriptions","organizations_url":"https://api.github.com/users/AnotherGoogleFans/orgs","repos_url":"https://api.github.com/users/AnotherGoogleFans/repos","events_url":"https://api.github.com/users/AnotherGoogleFans/events{/privacy}","received_events_url":"https://api.github.com/users/AnotherGoogleFans/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-10T08:28:33Z","updated_at":"2016-08-10T08:28:33Z","closed_at":null,"body":"Hi,\r\nI got a problem with NSQ.\r\nIn my project, one program is writing to NSQ, and another(let's called it client) read from NSQ.  The writing program will write 50,000 per second to NSQ. And I found the client read so slow so that the data in NSQ become more and more and finally hard disk get full. In order to checkout which the problem is, I changed the consumer handle to return nil(do nothing, just return nil so that every handle do not use much time), and set NSQ RDY 125000 and client MaxInFlight 10,000. But it also seemed much slower that write project.\r\nI wonder how to deal with this problem. Is that any config that I did not noticed?\r\nHere's my Client code:\r\n```\r\n...\r\n\tconf := nsq.NewConfig()\r\n\tconf.Set(\"max_in_flight\", 100000)\r\n\tconf.Set(\"rdy_redistribute_interval\", time.Millisecond*5)\r\n\tc, err := nsq.NewConsumer(\"Keywords\", \"test-channel\", conf)\r\n\tif err != nil {\r\n\t\treturn fmt.Errorf(\"fail to create new consumer. Topic: Keywords, channel: test-channel, error: %s\", err.Error())\r\n\t}\r\n\tf := new(f1)\r\n\tc.AddHandler(f) // add message handler\r\n\tif err := c.ConnectToNSQD(\"192.168.0.211:4150\"); err != nil {\r\n\t\tc.Stop()\r\n\t\treturn fmt.Errorf(\"fail to connect to NSQD. URL: 192.168.0.211:4150, error: %s\", err.Error())\r\n\t}\r\n...\r\ntype f1 struct {\r\n}\r\n\r\nfunc (f *f1) HandleMessage(msg *nsq.Message) error {\r\n\treturn nil\r\n}\r\n\r\n\r\n\r\n```\r\n"}}
{"actor":{"display_login":"AnotherGoogleFans"}}