ConfigurationKeys.SHARED_KAFKA_CONFIG_PREFIX)); builder.withConfig(kafkaConfig); : properties.getProperty(PusherUtils.KAFKA_PUSHER_CLASS_NAME_KEY, PusherUtils.DEFAULT_KAFKA_PUSHER_CLASS_NAME); builder.withPusherClassName(pusherClassName); return builder.build(brokers, eventsTopic.or(defaultTopic).get()); } catch (IOException exception) { log.error("Failed to create Kafka events reporter. Will not report events to Kafka.", exception);
/** * Set additional configuration. */ public T withConfig(Config config) { this.config = Optional.of(config); return self(); }
ConfigurationKeys.SHARED_KAFKA_CONFIG_PREFIX)); builder.withConfig(kafkaConfig); builder.withPusherClassName(properties.getProperty(PusherUtils.KAFKA_PUSHER_CLASS_NAME_KEY, PusherUtils.DEFAULT_KAFKA_PUSHER_CLASS_NAME)); return builder.build(brokers, eventsTopic.or(defaultTopic).get()); } catch (IOException exception) { log.error("Failed to create Kafka events reporter. Will not report events to Kafka.", exception);
/** * Set additional configuration. */ public T withConfig(Config config) { this.config = Optional.of(config); return self(); }
/** * Set a {@link Pusher} class name */ public T withPusherClassName(String pusherClassName) { this.pusherClassName = Optional.of(pusherClassName); return self(); }
/** * Set {@link Pusher} to use. */ public T withKafkaPusher(Pusher pusher) { this.kafkaPusher = Optional.of(pusher); return self(); }
KafkaEventReporter kafkaReporter = getBuilder(context, pusher).build("localhost:0000", "topic");
KafkaEventReporter kafkaReporter = getBuilder(context, pusher).build("localhost:0000", "topic");
KafkaEventReporter kafkaReporter = getBuilder(context, pusher).build("localhost:0000", "topic");
/** * Set a {@link Pusher} class name */ public T withPusherClassName(String pusherClassName) { this.pusherClassName = Optional.of(pusherClassName); return self(); }
/** * Set {@link Pusher} to use. */ public T withKafkaPusher(Pusher pusher) { this.kafkaPusher = Optional.of(pusher); return self(); }