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

Handle rabbit_delayed_message restarts. #55

Open
hairyhum opened this issue Jun 8, 2016 · 1 comment
Open

Handle rabbit_delayed_message restarts. #55

hairyhum opened this issue Jun 8, 2016 · 1 comment

Comments

@hairyhum
Copy link
Contributor

hairyhum commented Jun 8, 2016

If the rabbit_delayed_message process is restarted, a timer is not being started automatically until go is called or a new message is scheduled for delay.
This can cause significant delays in message arrival to queue if all publishers stop and rabbit_delayed_message is restarted, which is likely to happen simultaneously when the restart leads to a channel error.

@nagendravallapusetty
Copy link

I am also facing similar issue. Getting channel shutdown error with x-delayed-message.

Here is my code.
config:
@bean
CustomExchange delayExchange() {
Map<String, Object> args = new HashMap<String, Object>();
args.put("x-delayed-type", "topic");
return new CustomExchange(statusRetrievingProperties.getExchangeName(), "x-delayed-message", true, false, args);
}

publisher:
template.convertAndSend(statusRetrievingMessagingProperties.getExchangeName(), statusRetrievingMessagingProperties.getRoutingKey(), "test", new MessagePostProcessor() {
@OverRide
public Message postProcessMessage(Message message) throws AmqpException {
message.getMessageProperties().setHeader("x-delay", 15000);
return message;
}
});

please provide solution to resolve this issue and call consumer after specified delay.

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

No branches or pull requests

2 participants