[ 
https://issues.apache.org/jira/browse/METRON-891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15985053#comment-15985053
 ] 

Josh Meyer commented on METRON-891:
-----------------------------------

Taking a look at this now.

> KafkaConsumer should not be shared among threads
> ------------------------------------------------
>
>                 Key: METRON-891
>                 URL: https://issues.apache.org/jira/browse/METRON-891
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Ryan Merriman
>
> The KafkaConsumer is created as a Spring bean in the REST application and is 
> causing this error to periodically show up in the logs:
> SEVERE: Servlet.service() for servlet [dispatcherServlet] in context with 
> path [] threw exception [Request processing failed; nested exception is 
> java.util.ConcurrentModificationException: KafkaConsumer is not safe for 
> multi-threaded access] with root cause
> java.util.ConcurrentModificationException: KafkaConsumer is not safe for 
> multi-threaded access
>         at 
> org.apache.kafka.clients.consumer.KafkaConsumer.acquire(KafkaConsumer.java:1431)
>         at 
> org.apache.kafka.clients.consumer.KafkaConsumer.listTopics(KafkaConsumer.java:1293)
>         at 
> org.apache.metron.rest.service.impl.KafkaServiceImpl.listTopics(KafkaServiceImpl.java:97)
>         at 
> org.apache.metron.rest.service.impl.KafkaServiceImpl.getSampleMessage(KafkaServiceImpl.java:107)
>         at 
> org.apache.metron.rest.controller.KafkaController.getSample(KafkaController.java:89)
>         at sun.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:498)
>         at 
> org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
>         at 
> org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
>         at 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to