Skip to content

Commit

Permalink
DBZ-8318 Explain how to manage SPI and bundled jars for debezium engi…
Browse files Browse the repository at this point in the history
…ne applications
  • Loading branch information
mfvitale committed Oct 14, 2024
1 parent ca01420 commit f4f5df2
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion documentation/faq.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -384,4 +384,29 @@ This may be the case when Debezium (or rather the MongoDB change stream cursor)
Note that depending on the used `capture.mode` this issue can still manifest even when the actual value of the *stored* documents is significantly lower.

To mitigate this issue, refer to the documentation of link:/documentation/reference/stable/connectors/mongodb.html#mongodb-property-cursor-oversize-handling-mode[cursor.oversize.handling.mode] and
link:/documentation/reference/stable/connectors/mongodb.html#mongodb-property-cursor-oversize-skip-threshold[cursor.oversize.skip.threshold] properties.
link:/documentation/reference/stable/connectors/mongodb.html#mongodb-property-cursor-oversize-skip-threshold[cursor.oversize.skip.threshold] properties.

== Debezium engine applications fails with "Unable to find minimal snapshot lock mode. Please check your configuration" error

Debezium uses the SPI via the ServiceLoader to load different implementations depending on the connector type or for custom implementations.

When an interface has multiple implementations — for instance, `io.debezium.snapshot.spi.SnapshotLock`, which has a default implementation in the core and specific ones for each connector — you must explicitly configure your build tools to merge the `META-INF/services files`.
If this step is missed, Debezium may fail to locate the required implementation.

To address this, instruct your build tools accordingly. For example, if you are using the https://maven.apache.org/plugins/maven-shade-plugin[Maven shade plugin],
you need to add the https://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#ServicesResourceTransformer[`ServicesResourceTransformer`] transformer:

[source,xml]
----
...
<configuration>
<transformers>
...
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
...
</transformers>
...
</configuration>
----

Alternatively, if using the https://maven.apache.org/plugins/maven-assembly-plugin/index.html[Maven Assembly plug-in] you can utilize the https://maven.apache.org/plugins/maven-assembly-plugin/examples/single/using-container-descriptor-handlers.html[metaInf-services container descriptor handlers].

0 comments on commit f4f5df2

Please sign in to comment.