Support for engine filtering and multi connector engine debezium/dbz#2007#58
Conversation
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
…figuration for all connectors Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
…configuration Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
|
|
||
| @Inject | ||
| public DebeziumConnectorsRegistryProducer(Instance<DebeziumConnectorRegistry> registryInstances) { | ||
| this.registryInstances = registryInstances; |
There was a problem hiding this comment.
Since we are using only the List<DebeziumConnectorRegistry> instead of Instance<DebeziumConnectorRegistry> we could convert to list directly here instead of here
new DebeziumConnectorsRegistry() { private final List<DebeziumConnectorRegistry> registries = registryInstances .stream() .toList();
WDYT?
There was a problem hiding this comment.
It could be, but in this case I prefer to use lazy evaluation for the registries: the Jakarta producer is evaluated lazily when producing the connectors registry. When it's created the list is immutable.
| public interface DebeziumEngineFilterStrategy extends Predicate<Debezium> { | ||
| boolean test(Debezium debezium); | ||
|
|
||
| DebeziumEngineFilterStrategy DEFAULT = debezium -> true; |
There was a problem hiding this comment.
Maybe I am wrong but here we could provide a default test method that returns true in this interface instead of using a constant, right?
|
|
||
| private DebeziumEngine<?> getEngine() { | ||
| if (engine == null) { | ||
| throw new IllegalStateException(""); |
There was a problem hiding this comment.
| throw new IllegalStateException(""); | |
| throw new IllegalStateException("Debezium Engine is not running"); |
Naros
left a comment
There was a problem hiding this comment.
Just one inline question about Agroal setup with multi-connections or custom JDBC configuration setups.
| } | ||
|
|
||
| public Supplier<AgroalDatasourceConfiguration> get(String name) { | ||
| public Supplier<AgroalDatasourceConfiguration> get(List<Datasource> datasourceList) { |
There was a problem hiding this comment.
Tosses 🛠️ on the field and calls a 🏁 .... but does this limit us to one connection setup per connector, and what if said connector supplies more configuration properties than these, e.g., a custom JDBC URL, or, for example, uses two connections?
There was a problem hiding this comment.
No, we are not limited at all :D. This is the compatibility datasource record designed to align with the Debezium Server (engine) convention, which currently supports only a single engine (we don’t have a way to uniquely identify each individual configuration). If we instead use the Quarkus Agroal convention, we can define multiple connector connections (both homogeneous and heterogeneous) without any issues.
…configuration Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
closes debezium/dbz#2007