Offset backing store configuration

26 views
Skip to first unread message

Josh Rees-Jones

unread,
Jun 20, 2024, 6:55:41 PM (12 days ago) Jun 20
to debezium
Hello,

We are using Debezium in embedded mode. We're using the offset.storage property to specify a class that implements OffsetBackingStore, which Debezium is instantiating using the no-arg constructor.

We have some things that need to be configured on this object after it is created but before Debezium uses it. Is there a pattern that people use to make this happen?

For example, is there a way to do any of the following?
  • Pass in an object instead of a String class name
  • Get Debezium to create the object that will be used, get the object from Debezium, and start Debezium later on
  • Pass in a generalized configuration to the object
We're falling back to using @Configurable, but it's starting to get really complicated especially when running more than one Debezium in memory, for example during tests.

We also have this problem with other configurable classes, such as NotificationChannel, SchemaHistory, and SignalChannelReader.

Thanks for the attention!

Josh Rees-Jones

unread,
Jun 20, 2024, 7:44:13 PM (12 days ago) Jun 20
to debezium
In other words, when people are using a custom NotificationChannel, OffsetBackingStore, SchemaHistory, or SignalChannelReader with Spring, how do they inject stuff into it that is specific to that runtime of Debezium before Debezium starts?

A few things that don't seem like they will work:
  • Passing in an object instead of a string seems unsupported, but would be the best-case outcome
  • Passing in an arbitrary configuration that Debezium will give to every one of these types seems unsupported, but would be the second-best-case outcome
  • Using prototype scope to inject things won't work because if the bean is retrieved in non-Debezium code it will be different than the bean injected in Debezium code (via @Configurable)
  • Thread-scoped beans would work, but it is unwieldy to instrument and assumes all of these classes are created from the main DebeziumEngine / EmbeddedEngine thread
Hopefully this is enough detail for the ask; let me know if it's not clear. Thanks again!

jiri.p...@gmail.com

unread,
Jun 21, 2024, 4:40:05 AM (12 days ago) Jun 21
to debezium
Hi,

how about extending the engine code with the ability to pass arbitray class as WorkerConfig instead of always using `EmbeddedWorkerConfig`?

Jiri

Reply all
Reply to author
Forward
0 new messages