davsclaus commented on a change in pull request #4087:
URL: https://github.com/apache/camel/pull/4087#discussion_r471337545



##########
File path: 
components/camel-apns/src/main/java/org/apache/camel/component/apns/ApnsConsumer.java
##########
@@ -82,15 +82,15 @@ public ApnsEndpoint getEndpoint() {
     }
 
     @Override
-    protected void doStart() throws Exception {
+    protected void doInit() throws Exception {
         // only add as consumer if not already registered
         if (!getEndpoint().getConsumers().contains(this)) {
             if (!getEndpoint().getConsumers().isEmpty()) {
                 throw new IllegalStateException("Endpoint " + 
getEndpoint().getEndpointUri() + " only allows 1 active consumer but you 
attempted to start a 2nd consumer.");
             }
             getEndpoint().getConsumers().add(this);

Review comment:
       Same thing here as before, we should do this in doStart as its adding 
and removing consumers on the endpoint at runtime when its started/stopped.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to