{"record":{"id":"fe3f58a5ac4f81e0","repo":"quarkusio/quarkus","slug":"emitter-configuration-for-channel-channel-is","errorCode":null,"errorMessage":"Emitter configuration for channel `${channel}` is different than previous configuration : %s","messagePattern":"Emitter configuration for channel `(.+?)` is different than previous configuration : (.+?)","errorType":"exception","errorClass":"DeploymentException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java","lineNumber":371,"sourceCode":"                 * We need to register the invoker's constructor for reflection since it will be called inside smallrye.\n                 * We could potentially lift this restriction with some extra CDI bean generation, but it's probably not worth\n                 * it\n                 */\n                reflectiveClass\n                        .produce(ReflectiveClassBuildItem.builder(generatedInvokerName).build());\n                mediatorConfiguration\n                        .setInvokerClass((Class<? extends Invoker>) recorderContext.classProxy(generatedInvokerName));\n            } catch (IllegalArgumentException e) {\n                throw new DeploymentException(e); // needed to pass the TCK\n            }\n        }\n\n        for (InjectedEmitterBuildItem it : emitterFields) {\n            EmitterConfiguration configuration = it.getEmitterConfig();\n            String channel = configuration.name();\n            EmitterConfiguration previousConfig = emittersConfigurations.get(channel);\n            if (previousConfig != null && !previousConfig.equals(configuration)) {\n                throw new DeploymentException(\n                        String.format(\"Emitter configuration for channel `%s` is different than previous configuration : %s\",\n                                channel, it.getEmitterConfig()));\n            }\n            emittersConfigurations.put(channel, configuration);\n        }\n        for (InjectedChannelBuildItem it : channelFields) {\n            channelConfigurations.add(it.getChannelConfig());\n        }\n\n        // sort the recorder parameters for reproducible bytecode generation\n        mediatorConfigurations.sort(Comparator.comparing(QuarkusMediatorConfiguration::getBeanId)\n                .thenComparing(QuarkusMediatorConfiguration::getMethodName));\n        workerConfigurations.sort(Comparator.comparing(WorkerConfiguration::getClassName)\n                .thenComparing(WorkerConfiguration::getMethodName));\n        List<EmitterConfiguration> sortedEmitterConfigurations = emittersConfigurations.values().stream()\n                .sorted(Comparator.comparing(EmitterConfiguration::name))\n                .toList();\n        channelConfigurations.sort(Comparator.comparing(c -> c.channelName));","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-reactive-messaging/deployment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/SmallRyeReactiveMessagingProcessor.java#L353-L389","documentation":"Quarkus collects all injected Emitters (and channels) at deployment time. If two injection points target the same channel name but declare different EmitterConfiguration (e.g. different buffer sizes or overflow strategies), the build fails because SmallRye Reactive Messaging cannot pick a single consistent configuration for that channel.","triggerScenarios":"Injecting @Channel/@Emitter for the same channel name in multiple beans with conflicting emitter attributes (buffer size, overflow strategy).","commonSituations":"Two services in the same app injecting the same channel with different @BufferSize/@OverflowOn values; refactoring one injection point while another still holds old settings.","solutions":["Make all injections of the channel use identical EmitterConfiguration.","Use distinct channel names for different configurations.","Centralize the emitter in one bean and inject that bean elsewhere.","Keep emitter settings aligned with the mp.messaging.outgoing.<channel> config."],"exampleFix":"// before\n@Channel(\"a\") @BufferSize(10) Emitter<String> e1;\n@Channel(\"a\") @BufferSize(100) Emitter<String> e2;\n// after\n@Channel(\"a\") @BufferSize(100) Emitter<String> e1;\n@Channel(\"a\") @BufferSize(100) Emitter<String> e2;","handlingStrategy":"validation","validationCode":"// Search for all injections of a channel and diff their settings before building:\ngrep -rn '@Channel(\"my-channel\")' src/ --include='*.java' | xargs grep -n '@BufferSize\\|@OnOverflow'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use one constant per channel name and inject Emitter from a single producer bean.","Keep @BufferSize/@OnOverflow identical across all injection points of a channel.","Align injection attributes with mp.messaging.outgoing.<channel> configuration."],"tags":["quarkus","reactive-messaging","emitter","deployment","configuration-conflict"],"backgroundTag":"duplicate-configuration-conflict","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}