-
Notifications
You must be signed in to change notification settings - Fork 15
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
pause and resume for inbound binders #57
pause and resume for inbound binders #57
Conversation
Just to confirm, but is this PR implementing the actuator pause/resume endpoints feature or is this something else?
Are these services trying to stop their own consumers or remotely stopping other applications' consumers? Because if its the former, then have you tried using pollable consumers? Because if you're using a pollable consumer, then you could just stop polling to "pause" it.
|
@Nephery Yes the pause & resume can be triggered via those actuator endpoints. public class ProgrammaticStartStopController {
@AutoWired
private MessagingEndpoints endpoints;
@GetMapping(value = "/start/endpoint/{endpoint}")
public void startReceiveAll(
@PathVariable("endpoint") final String endpoint) {
if(endpoint.contentEquals("all")) {
endpoints.startEndpoints();
} else {
endpoints.startEndpoint(endpoint);
}
}
@GetMapping(value = "/resume/endpoint/{endpoint}")
public void resumeReceiveAll(
@PathVariable("endpoint") final String endpoint) {
if(endpoint.contentEquals("all")) {
endpoints.resumeEndpoints();
} else {
endpoints.resumeEndpoint(endpoint);
}
}
@GetMapping(value = "/pause/endpoint/{endpoint}")
public void pauseReceiveAll(
@PathVariable("endpoint") final String endpoint) {
if(endpoint.contentEquals("all")) {
endpoints.pauseEndpoints();
} else {
endpoints.pauseEndpoint(endpoint);
}
}
@GetMapping(value = "/stop/endpoint/{endpoint}")
public void stopReceiveAll(
@PathVariable("endpoint") final String endpoint) {
if(endpoint.contentEquals("all")) {
endpoints.stopEndpoints();
} else {
endpoints.stopEndpoint(endpoint);
}
}
} |
Hi all |
I rebased to be able to merge |
@Nephery how we can make progress here? |
@GreenRover I apologize for not responding sooner to this. @Nephery is currently engaged with another project that is taking up most of his time. We did a number of releases in a short time on the SCSt Binders and we are going to come back to them soon, but I don't think we are going to get to this or other PRs in the next month or 2. We truly appreciate your support and contributions to the project and don't want to dissuade you from further contributions, it's just a reality that our core development has many projects, commercial and open source, to maintain and we might be a bit slow to get to some PRs/Issues. Regards, |
@mackenza any updates here? Do we have a time line? |
@nathanaelweber Thank you for opening this pull request. We've added support for consumer pause/resume in #123 to be released in the Closing this pull request as a duplicate of #123. |
If multiple services want to pause their receiving repetitive, calculate something heavy, and resume all at once again, they don't want to create and stop a new connection. Therefore pause and resume is required at least on the inbound side. The part within InboundXMLMessageListener is tested and works.
Unit tests will be provided later, im still on that.
Can somebody provide an example how a user would actually use the "pollable binder" feature within class "JCSMPMessageSource"?
With that we could test the code in JCSMPMessageSource as well, but actually i see only the way with unit-tests.