alibaba/spring-cloud-alibaba · error · RuntimeException
Binding for channel {destination.getName()} has been disable
Error message
Binding for channel {destination.getName()} has been disabled, message can't be delivered What it means
Thrown by RocketMQMessageChannelBinder.createProducerMessageHandler when the per-binding producer extension flag `enabled` is false. The binder deliberately refuses to build a MessageHandler for that binding, so messages sent to the channel can never be produced. It is a configuration-driven guard, not a runtime transport failure.
Source
Thrown at spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/RocketMQMessageChannelBinder.java:84
private final RocketMQExtendedBindingProperties extendedBindingProperties;
private final RocketMQBinderConfigurationProperties binderConfigurationProperties;
public RocketMQMessageChannelBinder(
RocketMQBinderConfigurationProperties binderConfigurationProperties,
RocketMQExtendedBindingProperties extendedBindingProperties,
RocketMQTopicProvisioner provisioningProvider) {
super(new String[0], provisioningProvider);
this.extendedBindingProperties = extendedBindingProperties;
this.binderConfigurationProperties = binderConfigurationProperties;
}
@Override
protected MessageHandler createProducerMessageHandler(ProducerDestination destination,
ExtendedProducerProperties<RocketMQProducerProperties> extendedProducerProperties,
MessageChannel channel, MessageChannel errorChannel) throws Exception {
if (!extendedProducerProperties.getExtension().getEnabled()) {
throw new RuntimeException("Binding for channel " + destination.getName()
+ " has been disabled, message can't be delivered");
}
RocketMQProducerProperties mqProducerProperties = RocketMQUtils
.mergeRocketMQProperties(binderConfigurationProperties,
extendedProducerProperties.getExtension());
RocketMQProducerMessageHandler messageHandler = new RocketMQProducerMessageHandler(
destination, extendedProducerProperties, mqProducerProperties);
messageHandler.setApplicationContext(this.getApplicationContext());
if (errorChannel != null) {
messageHandler.setSendFailureChannel(errorChannel);
}
MessageConverterConfigurer.PartitioningInterceptor partitioningInterceptor = ((AbstractMessageChannel) channel)
.getInterceptors().stream()
.filter(channelInterceptor -> channelInterceptor instanceof MessageConverterConfigurer.PartitioningInterceptor)
.map(channelInterceptor -> ((MessageConverterConfigurer.PartitioningInterceptor) channelInterceptor))
.findFirst().orElse(null);
messageHandler.setPartitioningInterceptor(partitioningInterceptor);
messageHandler.setBeanFactory(this.getApplicationContext().getBeanFactory());View on GitHub (pinned to 115d590110)
Solutions
- Remove or set `spring.cloud.stream.rocketmq.bindings.<channel>.producer.enabled=true` (default is true).
- If the binding should truly be inert, delete the binding destination instead of disabling the producer.
- Search all active config files/profiles for `enabled: false` under the offending binding name.
Example fix
// application.yml (before) - binding silently dead
spring:
cloud:
stream:
rocketmq:
bindings:
myOutput:
producer:
enabled: false # causes [120]
# after
spring:
cloud:
stream:
rocketmq:
bindings:
myOutput:
producer:
enabled: true # or omit the key entirely Defensive patterns
Strategy: validation
Validate before calling
// Validate binding extension before relying on the channel to produce.
ExtendedProducerProperties<RocketMQProducerProperties> props = /* ... */;
if (!props.getExtension().getEnabled()) {
throw new IllegalStateException(
"Binding " + bindingName + " producer disabled; outbound sends will throw [120]");
} Prevention
- Never leave `enabled: false` on a binding you still publish to.
- Centralize binding config so profile overrides cannot silently flip `enabled`.
- Add a startup assertion that any outbound binding has producer enabled=true.
When it happens
Trigger: A binding's RocketMQ producer extension has `enabled=false` (e.g. `spring.cloud.stream.rocketmq.bindings.<channel>.producer.enabled=false`), then the framework tries to provision the producer handler for that channel.
Common situations: An `enabled=false` left over from disabling a binding during testing/migration; a profile override setting it false; mistakenly applying the consumer-side `enabled=false` to the producer section; or wiring where the binding was meant to be removed but is still referenced.
Related errors
- group must be configured for DLQ{destination.getName()}
- TransactionMQProducer must have a TransactionListener !!!
- message hasn't been sent,cause by : the SendType must be in
- empty after conversion [messageConverter:%s,payloadClass:%s,
- topic must not be empty
AI-assisted analysis of alibaba/spring-cloud-alibaba@115d590110 (2026-08-14).
Data as JSON: /api/errors/21864e3161be1852.
Report an issue: GitHub.