1 package com.atlassian.messagequeue;
2
3 import com.atlassian.annotations.PublicApi;
4
5 import javax.annotation.Nullable;
6
7 /**
8 * Thrown on message runner invocation when a payload that is too large is passed.
9 * @since 1.0
10 */
11 @PublicApi
12 public class MessagePayloadSizeExceededException extends RuntimeException {
13 /**
14 * @param key message runner key
15 * @param maxSize max size
16 */
17 public MessagePayloadSizeExceededException(@Nullable MessageRunnerKey key, long maxSize) {
18 super("Message runner with key: '" + key + "' invoked with payload that is above the max size of " + maxSize);
19 }
20 }