1 package com.atlassian.messagequeue;
2
3 import com.atlassian.annotations.PublicApi;
4
5 /**
6 * Constants for the MessageRunner system.
7 * @since v1.0
8 */
9 @PublicApi
10 public class MessageRunnerConstants {
11
12 private static final int MAX_PAYLOAD_SIZE = 32 * 1024;
13
14 /**
15 * <p>
16 * Note that this is deliberately not exposed as a system property. It is determined by the max size of
17 * something that will fit in an SQS message, minus a defensible approximation how a java string is encoded
18 * to sent to SQS.
19 * </p>
20 * <p>
21 * This could change when SQS increases its capacity, or when we decide that the we can squeeze more out of
22 * encoding. Either of those events are rare enough that having this declared in-code is acceptable.
23 * </p>
24 * @return the max size of message payloads.
25 */
26 public static int payloadMaxSize() {
27 return MAX_PAYLOAD_SIZE;
28 }
29 }