Skip to content

Set default sendFailureChannelName to "errorChannel" #10164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rrileyca
Copy link

Closes #10163.

the RabbitStreamMessageHandler previously did not set a sendFailureChannelName. If sync was set to false (as it is in the default constructor for RabbitStreamMessageHandler), then errors thrown by the Rabbit Stream client would be silently discarded.

This PR changes the default sendFailureChannelName to be "errorChannel".

@@ -77,6 +78,7 @@ public class RabbitStreamMessageHandler extends AbstractMessageHandler {
public RabbitStreamMessageHandler(RabbitStreamOperations streamOperations) {
Assert.notNull(streamOperations, "'streamOperations' cannot be null");
this.streamOperations = streamOperations;
this.sendFailureChannelName = IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And why don't you reset it back to null, when the mode is sync?
That's not what we have discussed with you.
The default null has still be there for sync mode when we re-throw exception from the Future.get().

Any chances to have something covered with tests in the RabbitStreamMessageHandlerTests, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RabbitMQ Streams Client Errors Getting Lost
2 participants