Skip to content
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

[SOL-76960] Binder does not cleanup flows if flow is opened but binding creation fails #146

Open
GreenRover opened this issue Jun 29, 2022 · 2 comments
Labels
bug Something isn't working tracked Internally tracked by Solace's internal issue tracking system

Comments

@GreenRover
Copy link
Contributor

If the queue is already existing but the user is not allowed to consume the queue.

I get an error like this:

Caused by: com.solacesystems.jcsmp.JCSMPErrorResponseException: 403: Permission Not Allowed - Queue 'scst/ato-cockpit/internal/tms/ato/transactor/i-alpha/v1/trackside/event' - Topic 'internal/tms/ato/transactor/i-alpha/v1/trackside/event'
at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.createErrorResponseFromSmpFailure(TcpClientChannel.java:1033)
at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.checkSmpResponseOK(TcpClientChannel.java:999)
at com.solacesystems.jcsmp.protocol.impl.TcpClientChannel.doSmpRequest(TcpClientChannel.java:971)
at com.solacesystems.jcsmp.impl.SessionModeSupportClient.performSmpReq(SessionModeSupportClient.java:256)
... 17 common frames omitted

What so far is totally ok.

Now the binder is trying this in a endless loop without releasing the failed Flows.

What should be changed:

@GreenRover
Copy link
Contributor Author

Ping @Mrc0113

@Nephery
Copy link
Collaborator

Nephery commented Aug 23, 2022

The failed Flow should be closed correctly.

Yeah, this is a bug. It's failing to cleanup the flows if there's a failure during binding creation after the flow is opened, but before binding creation is complete. Like in this case, when it fails to add subscriptions after the flow is opened.

In this moment the application is not healthy and should indicate it: #145

Not entirely sure if binding creation should be captured by the health indicator (probably yes, but need to verify). If so, then this should be handled by #145 instead of this issue.

If for example: "connectRetries: 2" is configured the application should give up after 2 attempts

Binding creation retries is entirely controlled by the Spring Cloud Stream framework by spring.cloud.stream.bindingRetryInterval. If you want it to "give up", you should configure that to be 0.

@Nephery Nephery added the bug Something isn't working label Aug 23, 2022
@Nephery Nephery changed the title Binder creates endless Flows if lack of permission for queue Binder does not cleanup flows if flow is opened but binding creation fails Aug 23, 2022
@Nephery Nephery changed the title Binder does not cleanup flows if flow is opened but binding creation fails [SOL-76960] Binder does not cleanup flows if flow is opened but binding creation fails Aug 29, 2022
@Nephery Nephery added the tracked Internally tracked by Solace's internal issue tracking system label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tracked Internally tracked by Solace's internal issue tracking system
Projects
None yet
Development

No branches or pull requests

2 participants