public class QueryApplicationConfiguration
{
@Bean
- public QueryStreamProcessor streamProcessor(
+ public HostInfo applicationServer(
ServerProperties serverProperties,
- QueryApplicationProperties applicationProperties,
- ObjectMapper mapper,
- ConfigurableApplicationContext context) throws IOException
+ QueryApplicationProperties applicationProperties) throws IOException
{
String host;
if (serverProperties.getAddress() == null)
Integer port = serverProperties.getPort() == null ? 8080 : serverProperties.getPort();
+ return new HostInfo(host, port);
+ }
+
+ @Bean
+ public QueryStreamProcessor streamProcessor(
+ QueryApplicationProperties applicationProperties,
+ HostInfo applicationServer,
+ ObjectMapper mapper,
+ ConfigurableApplicationContext context)
+ {
return new QueryStreamProcessor(
applicationProperties.getApplicationId(),
- new HostInfo(host, port),
+ applicationServer,
applicationProperties.getBootstrapServer(),
applicationProperties.getUsersInputTopic(),
applicationProperties.getRankingInputTopic(),