Skip to content

Commit

Permalink
Create ConnectionEventProducer for HTTP adapter.
Browse files Browse the repository at this point in the history
Otherwise the HTTP adapter does not start due to unsatisfied Spring
bean dependencies. Providing it as already done for the MQTT adapter
fixes it and should offer the same feature for HTTP too.

Signed-off-by: Karsten Frank <Karsten.Frank@bosch-si.com>
  • Loading branch information
sysexcontrol committed May 7, 2018
1 parent 8e2ce85 commit 4740006
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import org.eclipse.hono.config.ApplicationConfigProperties;
import org.eclipse.hono.config.ClientConfigProperties;
import org.eclipse.hono.service.AbstractAdapterConfig;
import org.eclipse.hono.service.monitoring.ConnectionEventProducer;
import org.eclipse.hono.service.monitoring.LoggingConnectionEventProducer;
import org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -97,4 +99,17 @@ public ObjectFactoryCreatingFactoryBean serviceFactory() {
factory.setTargetBeanName(BEAN_NAME_VERTX_BASED_HTTP_PROTOCOL_ADAPTER);
return factory;
}

/**
* Exposes the connection event producer implementation.
* <p>
* This defaults to a {@link LoggingConnectionEventProducer} which logs to the default level.
*
* @return The connection event producer.
*/
@Bean
public ConnectionEventProducer connectionEventProducer() {
return new LoggingConnectionEventProducer();
}

}

0 comments on commit 4740006

Please sign in to comment.