{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-kafka/issues/210","repository_url":"https://api.github.com/repos/spring-projects/spring-kafka","labels_url":"https://api.github.com/repos/spring-projects/spring-kafka/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-kafka/issues/210/comments","events_url":"https://api.github.com/repos/spring-projects/spring-kafka/issues/210/events","html_url":"https://github.com/spring-projects/spring-kafka/issues/210","id":193302996,"number":210,"title":"Kafka creates a lot of major GC","user":{"login":"aghosh1234","id":15932809,"avatar_url":"https://avatars.githubusercontent.com/u/15932809?v=3","gravatar_id":"","url":"https://api.github.com/users/aghosh1234","html_url":"https://github.com/aghosh1234","followers_url":"https://api.github.com/users/aghosh1234/followers","following_url":"https://api.github.com/users/aghosh1234/following{/other_user}","gists_url":"https://api.github.com/users/aghosh1234/gists{/gist_id}","starred_url":"https://api.github.com/users/aghosh1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aghosh1234/subscriptions","organizations_url":"https://api.github.com/users/aghosh1234/orgs","repos_url":"https://api.github.com/users/aghosh1234/repos","events_url":"https://api.github.com/users/aghosh1234/events{/privacy}","received_events_url":"https://api.github.com/users/aghosh1234/received_events","type":"User","site_admin":false},"labels":[{"id":376276515,"url":"https://api.github.com/repos/spring-projects/spring-kafka/labels/waiting%20for%20reporter","name":"waiting for reporter","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-12-03T17:38:18Z","updated_at":"2016-12-05T16:04:10Z","closed_at":null,"body":"When kafka has a huge lags lets say 40K , kafka consumer codes started a lot of major GC, even we restart the application or kafka servers but not any improvements.It slows down the consumer message processing. It looks like a huge number of kafka-listener thread gets created. How we can control the major GC? Is there any way to nullify the thread instances?"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-kafka/issues/comments/264893955","html_url":"https://github.com/spring-projects/spring-kafka/issues/210#issuecomment-264893955","issue_url":"https://api.github.com/repos/spring-projects/spring-kafka/issues/210","id":264893955,"user":{"login":"aghosh1234","id":15932809,"avatar_url":"https://avatars.githubusercontent.com/u/15932809?v=3","gravatar_id":"","url":"https://api.github.com/users/aghosh1234","html_url":"https://github.com/aghosh1234","followers_url":"https://api.github.com/users/aghosh1234/followers","following_url":"https://api.github.com/users/aghosh1234/following{/other_user}","gists_url":"https://api.github.com/users/aghosh1234/gists{/gist_id}","starred_url":"https://api.github.com/users/aghosh1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aghosh1234/subscriptions","organizations_url":"https://api.github.com/users/aghosh1234/orgs","repos_url":"https://api.github.com/users/aghosh1234/repos","events_url":"https://api.github.com/users/aghosh1234/events{/privacy}","received_events_url":"https://api.github.com/users/aghosh1234/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T16:04:10Z","updated_at":"2016-12-05T16:04:10Z","body":"Can we use a counter and control the creation of invoker thread? Something like:\r\n\r\nprivate void startInvoker() {\r\n\t\t\tthis.logger.debug(\"Entering the startInvoker method and count is :: \"+ListenerConsumer.this.invokerInstanceCount +\" and called by :: \"+Thread.currentThread().getName());\r\n\t\t\tif(ListenerConsumer.this.invokerInstanceCount<100){\r\n\t\t\t\tListenerConsumer.this.invokerInstanceCount++;\r\n\t\t\t\tListenerConsumer.this.invoker = new ListenerInvoker();\r\n\t\t\t}\r\n\t\t\tListenerConsumer.this.listenerInvokerFuture = this.containerProperties.getListenerTaskExecutor()\r\n\t\t\t\t\t.submit(ListenerConsumer.this.invoker);\r\n\t\t}\r\n\r\nand inside finally block of stopInvokerAndCommitManualAcks() method we can make count down the counter like:\r\n\r\nfinally {\r\n\t\t\t\tListenerConsumer.this.invokerInstanceCount--;\r\n\t\t\t\tthis.listenerInvokerFuture = null;\r\n\t\t\t}\r\n\r\nHow do you thing is it feasible?\r\n"}}
{"actor":{"display_login":"aghosh1234"}}