@Test public void shouldIncludeKafkaCustomizerOptions() { ComponentProxyComponent mockComponent = mock(ComponentProxyComponent.class); DebeziumConsumerCustomizer debeziumCustomizer = new DebeziumConsumerCustomizer(new DefaultCamelContext()); Map<String, Object> userOptions = new HashMap<>(); userOptions.put("brokers","1.2.3.4:9093"); userOptions.put("transportProtocol","TSL"); userOptions.put("brokerCertificate",SAMPLE_CERTIFICATE); debeziumCustomizer.customize(mockComponent, userOptions); assertThat(userOptions.get("configuration")).isNotNull(); }
@Override public void customize(final ComponentProxyComponent component, final Map<String, Object> options) { kafkaConnectionCustomizer.customize(component, options); component.setBeforeConsumer(DebeziumConsumerCustomizer::convertToDebeziumFormat); }
DebeziumConsumerCustomizer implements ComponentProxyCustomizer, CamelContextAware { @Override public void customize(final ComponentProxyComponent component, final Map<String, Object> options) { kafkaConnectionCustomizer.customize(component, options); component.setBeforeConsumer(DebeziumConsumerCustomizer::convertToDebeziumFormat); } }
DebeziumConsumerCustomizer implements ComponentProxyCustomizer, CamelContextAware { @Override public void customize(final ComponentProxyComponent component, final Map<String, Object> options) { kafkaConnectionCustomizer.customize(component, options); component.setBeforeConsumer(DebeziumConsumerCustomizer::convertToDebeziumFormat); } DebeziumConsumerCustomizer(CamelContext context); }
DebeziumConsumerCustomizer implements ComponentProxyCustomizer, CamelContextAware { @Override public void customize(final ComponentProxyComponent component, final Map<String, Object> options) { kafkaConnectionCustomizer.customize(component, options); component.setBeforeConsumer(DebeziumConsumerCustomizer::convertToDebeziumFormat); } DebeziumConsumerCustomizer(CamelContext context); @Override CamelContext getCamelContext(); @Override final void setCamelContext(CamelContext camelContext); @Override void customize(final ComponentProxyComponent component, final Map<String, Object> options); }
DebeziumConsumerCustomizer implements ComponentProxyCustomizer, CamelContextAware { @Override public void customize(final ComponentProxyComponent component, final Map<String, Object> options) { kafkaConnectionCustomizer.customize(component, options); component.setBeforeConsumer(DebeziumConsumerCustomizer::convertToDebeziumFormat); } DebeziumConsumerCustomizer(CamelContext context); @Override CamelContext getCamelContext(); @Override final void setCamelContext(CamelContext camelContext); @Override void customize(final ComponentProxyComponent component, final Map<String, Object> options); static final String DEBEZIUM_OPERATION; }