<div>I think the library needs to be ptachted to tear down the injected consumer when the server shuts down. There is a CDI lifecycle event for that.</div><div><br></div><div>AFK, so can&#39;t do much </div><div><br></div><div><br></div><div>HTH,</div><div>Matthias</div><div><br></div><div><br></div><div><br><div class="gmail_quote"><div>On Thu, 13 Jul 2017 at 12:47, Polina Koleva &lt;<a href="mailto:polina.n.koleva@gmail.com">polina.n.koleva@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hey, everyone :)<div>As we finished the initial integration of Kafka in UPS, we decided to use a <a href="https://github.com/matzew/kafka-cdi" target="_blank">CDI library</a> to ease the addition of new Kafka consumers/producers. Unfortunately, when I added a consumer by injection (<a href="https://github.com/polinankoleva/aerogear-unifiedpush-server/commit/27961bc29f3be817faaf845baa2893a32eeae3da" target="_blank">github commit</a>) I encountered three problems. I have tried to do my best to figure them out but I still have no clue for them. They all happen after a redeployment of the UPS, so I suppose there is a problem when a consumer is destroyed/created again. </div><div><br></div><div>You can find the problems described in JIRA. I really appreciate your help.</div><div><br></div><div>1. <a href="https://issues.jboss.org/browse/AGPUSH-2145" target="_blank">ComponentIsStoppedException</a></div><div>2. <a href="https://issues.jboss.org/browse/AGPUSH-2139" target="_blank">IllegalArgumentException: object is not an instance of declaring class</a></div><div>3. <a href="https://issues.jboss.org/browse/AGPUSH-2140" target="_blank">InstanceAlreadyExistsException</a> -  I suppose this happens because we never close the consumer. That&#39;s why I made a <a href="https://github.com/matzew/kafka-cdi/pull/12" target="_blank">pull request</a> with an addition of shutdown method for the consumer. But not sure where exactly this method has to be invoked. </div><div><br></div><div>Thanks, Polina</div></div>
_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a></blockquote></div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature">Sent from Gmail Mobile</div>