{"record":{"id":"21864e3161be1852","repo":"alibaba/spring-cloud-alibaba","slug":"binding-for-channel-destination-getname-has-be","errorCode":null,"errorMessage":"Binding for channel {destination.getName()} has been disabled, message can't be delivered","messagePattern":"Binding for channel (.+?) has been disabled, message can't be delivered","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/RocketMQMessageChannelBinder.java","lineNumber":84,"sourceCode":"\tprivate final RocketMQExtendedBindingProperties extendedBindingProperties;\n\n\tprivate final RocketMQBinderConfigurationProperties binderConfigurationProperties;\n\n\tpublic RocketMQMessageChannelBinder(\n\t\t\tRocketMQBinderConfigurationProperties binderConfigurationProperties,\n\t\t\tRocketMQExtendedBindingProperties extendedBindingProperties,\n\t\t\tRocketMQTopicProvisioner provisioningProvider) {\n\t\tsuper(new String[0], provisioningProvider);\n\t\tthis.extendedBindingProperties = extendedBindingProperties;\n\t\tthis.binderConfigurationProperties = binderConfigurationProperties;\n\t}\n\n\t@Override\n\tprotected MessageHandler createProducerMessageHandler(ProducerDestination destination,\n\t\t\tExtendedProducerProperties<RocketMQProducerProperties> extendedProducerProperties,\n\t\t\tMessageChannel channel, MessageChannel errorChannel) throws Exception {\n\t\tif (!extendedProducerProperties.getExtension().getEnabled()) {\n\t\t\tthrow new RuntimeException(\"Binding for channel \" + destination.getName()\n\t\t\t\t\t+ \" has been disabled, message can't be delivered\");\n\t\t}\n\t\tRocketMQProducerProperties mqProducerProperties = RocketMQUtils\n\t\t\t\t.mergeRocketMQProperties(binderConfigurationProperties,\n\t\t\t\t\t\textendedProducerProperties.getExtension());\n\t\tRocketMQProducerMessageHandler messageHandler = new RocketMQProducerMessageHandler(\n\t\t\t\tdestination, extendedProducerProperties, mqProducerProperties);\n\t\tmessageHandler.setApplicationContext(this.getApplicationContext());\n\t\tif (errorChannel != null) {\n\t\t\tmessageHandler.setSendFailureChannel(errorChannel);\n\t\t}\n\t\tMessageConverterConfigurer.PartitioningInterceptor partitioningInterceptor = ((AbstractMessageChannel) channel)\n\t\t\t\t.getInterceptors().stream()\n\t\t\t\t.filter(channelInterceptor -> channelInterceptor instanceof MessageConverterConfigurer.PartitioningInterceptor)\n\t\t\t\t.map(channelInterceptor -> ((MessageConverterConfigurer.PartitioningInterceptor) channelInterceptor))\n\t\t\t\t.findFirst().orElse(null);\n\t\tmessageHandler.setPartitioningInterceptor(partitioningInterceptor);\n\t\tmessageHandler.setBeanFactory(this.getApplicationContext().getBeanFactory());","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/alibaba/spring-cloud-alibaba/blob/115d5901102009492e05d5ec18c3f79cad4077d0/spring-cloud-alibaba-starters/spring-cloud-starter-stream-rocketmq/src/main/java/com/alibaba/cloud/stream/binder/rocketmq/RocketMQMessageChannelBinder.java#L66-L102","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// application.yml (before) - binding silently dead\nspring:\n  cloud:\n    stream:\n      rocketmq:\n        bindings:\n          myOutput:\n            producer:\n              enabled: false   # causes [120]\n# after\nspring:\n  cloud:\n    stream:\n      rocketmq:\n        bindings:\n          myOutput:\n            producer:\n              enabled: true    # or omit the key entirely","handlingStrategy":"validation","validationCode":"// Validate binding extension before relying on the channel to produce.\nExtendedProducerProperties<RocketMQProducerProperties> props = /* ... */;\nif (!props.getExtension().getEnabled()) {\n    throw new IllegalStateException(\n        \"Binding \" + bindingName + \" producer disabled; outbound sends will throw [120]\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["rocketmq","spring-cloud-stream","config","producer","binding"],"backgroundTag":null,"analyzedSha":"115d5901102009492e05d5ec18c3f79cad4077d0","analyzedAt":"2026-08-14T04:47:13.900Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}