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

Extending the incoming Stomp sessionId as an attribute in TcpClient #25924

Closed
wants to merge 1 commit into from

Conversation

rupebac
Copy link

@rupebac rupebac commented Oct 16, 2020

The final idea is to be able to balance the load of the Stomp cluster, by grouping all sessions from the same user in the same Stomp Broker Relay server.

In order to achieve this, the very bare minimum is to gain access to the session Id at the TcpClient#doOnConnect callbacks, in order to customize from there the specific instance of the TcpClient#remoteAddress supplier.

Of course, passing on the whole StompHeaderAccessor from StompBrokerRelayMessageHandler#handleMessageInternal to ReactorNettyTcpClient may be better for my case, but it may perhaps make the average usages a bit more complicated.

I am very much open for suggestions or discussions on this matter.

This solves #25889 .

…essageHandler down to the TcpClient.

In this way, we can customize the bootstrap of the TcpClient, allowing a more sophisticated selection of the remoteAddress, since now we can gain access to the attributes populated by ReactorNettyTcpClient inside the TcpClient#doOnConnect() callback.

The final idea is to be able to balance the load of the Stomp cluster, by grouping all sessions from the same user in the same Stomp Broker Relay server.
@pivotal-issuemaster
Copy link

@rupebac Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 16, 2020
@pivotal-issuemaster
Copy link

@rupebac Thank you for signing the Contributor License Agreement!

@rstoyanchev
Copy link
Contributor

Closing as per #25889 (comment). Thanks for the suggestion.

@rstoyanchev rstoyanchev added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants