This closes #2714
This commit is contained in:
commit
aec477932c
|
@ -556,6 +556,12 @@ public class JournalStorageManager extends AbstractJournalStorageManager {
|
|||
final int messageEncodeSize = largeMessage.getEncodeSize();
|
||||
|
||||
if (messageEncodeSize > maxRecordSize) {
|
||||
ActiveMQServerLogger.LOGGER.messageWithHeaderTooLarge(largeMessage.getMessageID(), logger.getName());
|
||||
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Message header too large for " + largeMessage);
|
||||
}
|
||||
|
||||
throw ActiveMQJournalBundle.BUNDLE.recordLargerThanStoreMax(messageEncodeSize, maxRecordSize);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2002,4 +2002,9 @@ public interface ActiveMQServerLogger extends BasicLogger {
|
|||
@LogMessage(level = Logger.Level.INFO)
|
||||
@Message(id = 224098, value = "Received a vote saying the backup is live with connector: {0}", format = Message.Format.MESSAGE_FORMAT)
|
||||
void qourumBackupIsLive(String liveConnector);
|
||||
|
||||
@LogMessage(level = Logger.Level.WARN)
|
||||
@Message(id = 224099, value = "Message with ID {0} has a header too large. More information available on debug level for class {1}",
|
||||
format = Message.Format.MESSAGE_FORMAT)
|
||||
void messageWithHeaderTooLarge(Long messageID, String loggerClass);
|
||||
}
|
||||
|
|
|
@ -285,7 +285,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
|
|||
|
||||
connection.connect();
|
||||
|
||||
final int strLength = 1024 * 1024;
|
||||
final int strLength = 512 * 1024;
|
||||
AmqpSession session = connection.createSession();
|
||||
AmqpSender sender = session.createSender(testQueueName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue