pl.allegro.tech.hermes.common.exception.UnavailableRateException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-common Show documentation
Show all versions of hermes-common Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.common.exception;
import pl.allegro.tech.hermes.api.ErrorCode;
import pl.allegro.tech.hermes.api.TopicName;
@SuppressWarnings("serial")
public class UnavailableRateException extends HermesException {
public UnavailableRateException(TopicName topicName, String subscriptionName, Throwable cause) {
super(String.format(
"Rate for %s subscription on %s topic in group %s is unavailable.",
subscriptionName, topicName.getName(), topicName.getGroupName()), cause
);
}
public UnavailableRateException(TopicName topicName, Throwable cause) {
super(String.format(
"Rate for %s topic in group %s is unavailable",
topicName.getName(), topicName.getGroupName()),
cause
);
}
@Override
public ErrorCode getCode() {
return ErrorCode.UNAVAILABLE_RATE;
}
}