Conversation
…ing Kafka sub-channels When a dynamic channel (e.g. "async") wraps Kafka sub-channels, the RESEND failure strategy crashed with "Publisher configuration for async not found" because KafkaAcknowledgementCallback used the endpoint ID instead of the actual channel name for publisher lookup. Added polledChannelName to PollingMetadata so the actual channel name propagates through the polling flow. DynamicMessageChannel overrides it with the resolved sub-channel name before delegating.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this change proposed?
When a dynamic channel (e.g.
"async") wraps Kafka sub-channels (e.g."async_tenant_a","async_tenant_b"), the RESEND failure strategy crashes with"Publisher configuration for async not found". This happens becauseKafkaAcknowledgementCallback::resend()uses the polling metadata's endpoint ID to look up the producer, but only the actual Kafka channel names have registered publisher configs. This makes dynamic channels with Kafka unusable when RESEND failure strategy is configured.Usage Example
Use Case Scenarios
sequenceDiagram participant Consumer participant DynamicChannel as DynamicChannel "async" participant SubChannel as KafkaChannel "async_tenant_a" participant Handler Consumer->>DynamicChannel: poll (endpointId="async") DynamicChannel->>SubChannel: poll (polledChannelName="async_tenant_a") SubChannel-->>DynamicChannel: message DynamicChannel-->>Consumer: message Consumer->>Handler: handle message Handler-->>Consumer: throws Exception Note over Consumer: RESEND strategy triggered Consumer->>SubChannel: resend using channelName="async_tenant_a" Note over SubChannel: Producer found ✓ (was failing with "async")Pull Request Contribution Terms