Skip to content

Ability to create new bindings at runtime via the BindingLifecycleController #3086

@jmannix-ot

Description

@jmannix-ot

We discussed this previously on issues #3071 and #3077.

In summary, we have a library which needs to both modify existing Kafka bindings and generate new Kafka bindings at runtime during application initialisation.

Previously we were fetching the list of bindings by auto-wiring KafkaExtendedBindingProperties and calling getBindings(). Then we modified and added to the list of bindings before updating them by calling setBindings().

We encountered an issue when upgrading to spring-cloud-stream 4.1.4 caused by the change for #2974. The addition of @validated to AbstractExtendedBindingProperties broke the auto-wiring of KafkaExtendedBindingProperties.

After some discussion we agreed that the better way to handle our use case was to use BindingsLifecycleController, and @olegz made some changes for us to make it possible to fetch and modify bindings.

However, we still need a way to generate new bindings at runtime. And that is currently not supported by BindingsLifecycleController.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions