Skip to content

Instantly share code, notes, and snippets.

@danpalmer
Created September 11, 2012 10:57
Show Gist options
  • Save danpalmer/3697586 to your computer and use it in GitHub Desktop.
Save danpalmer/3697586 to your computer and use it in GitHub Desktop.
long deliveryTag = envelope.getDeliveryTag();
//...
boolean success = handler.handleMessage(object, routingKey);
if (success) {
channel.basicAck(deliveryTag, false);
} else {
channel.basicNack(deliveryTag, false, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment