Error when sending using StreamBridge: SimpleFunctionRegistry$FunctionInvocationWrapper returned null
17:02 06 Jan 2026

I am getting the following error when using StreamBridge.send. I have not seen this error before, and the logs don't provide any insight.

java.lang.RuntimeException: org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper returned null
    at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:228)
    at org.springframework.cloud.stream.function.StreamBridge.send(StreamBridge.java:178)

When searching google et al for this log message, the thing that looks remotely close to this problem is this:

The java.lang.RuntimeException: org.springframework.cloud.function.context.catalog.SimpleFunctionRegistry$FunctionInvocationWrapper returned null error during StreamBridge.send calls typically arises when the function to invoke is not properly registered or is null at the time of invocation. This can occur in scenarios where a bean implementing SmartInitializingSingleton attempts to use StreamBridge.send before the function catalog is fully initialized, leading to a null function being cached and subsequently causing a NullPointerException. Similarly, if a consumer method attempts to use StreamBridge during application startup and the functionCatalog is not yet populated, the FunctionInvocationWrapper may be null, resulting in the same exception. The issue is exacerbated when the function registration happens after the afterSingletonsInstantiated phase, making the null state irrecoverable without a restart. This behavior is particularly problematic in environments like Azure Storage where message handlers are initialized early in the bootstrapping process.

However, waiting a long time to call send doesn't seem to have any effect.

spring boot 3.4.3

spring cloud stream kafka binder 4.3.1

Any help is appreciated!

spring-cloud-stream-binder-kafka