Large message threshold
When the size of a message is equal to or larger than the value in the
Threshold box, BizTalk Server 2004 fragments the message. The default value for the large message threshold is 102,400 bytes.
When a message batch is processed, the in-memory size of the message batch may reach the number of bytes that is specified for the large message threshold. If this occurs, the part of the message batch that has been processed is written to the MessageBox database before the rest of the message batch is processed. BizTalk Server 2004 performs the database write under the context of a Microsoft Distributed Transaction Coordinator (MS DTC) transaction as follows:
- If the message batch is being published under the context of an existing MS DTC transaction, the existing transaction is used to write the processed part of the message batch to the MessageBox database. For example, if the incoming message batch is being published by a transactional adapter that is configured to require transactions, the existing transaction is used to write the processed part of the message batch to the MessageBox database.
- If the message batch is not being published under the context of an existing MS DTC transaction, a new MS DTC transaction is created to write the processed part of the message batch to the MessageBox database. The MS DTC transaction is used to guarantee that all the parts of a given message batch are successfully written to the MessageBox database.
The large message threshold applies to a message batch. However, because a message batch can be set to a value of one, the large message threshold also applies indirectly to individual messages. For example, when a message batch of one message exceeds the specified large message threshold, the large message threshold applies to the single message in the message batch.
You can configure the large message threshold to reduce the number of MS DTC transactions that are created to allocate message batches to the MessageBox database. You should do this because the excessive use of MS DTC transactions may decrease server performance. You can use the following calculation to determine what the minimum value for the large message threshold should be to avoid creating MS DTC transactions unnecessarily:
Batch size * Average size in bytes of each message in the batch after the receive pipeline processes the message < Large message threshold
As long as the total size in bytes of the message batch does not exceed the specified large message threshold, BizTalk Server 2004 does not have to create an MS DTC transaction to allocate a message batch to the MessageBox database.
Large message fragment size
When the in-memory size of a received message exceeds the number of bytes that is specified in the
Fragment size box, BizTalk Server 2004 splits the message into fragments of the specified size. The fragments are written to the MessageBox database under the context of an MS DTC transaction as follows:
- If the incoming message is being published under the context of an existing MS DTC transaction, the existing transaction is used to write the message fragments to the MessageBox database. For example, if the incoming message is being published by a transactional adapter that is configured to require transactions, the existing transaction is used to write the message fragments to the MessageBox database.
- If the incoming message is not being published under the context of an existing MS DTC transaction, a new MS DTC transaction is created to write the message fragments to the MessageBox database.
You can increase the large message fragment size to reduce the frequency with which large messages are fragmented and to reduce the number of MS DTC transactions that are created. This may increase performance. However, increasing the large message fragment size may also increase the amount of available memory that is used.
If it takes longer than the maximum MS DTC transaction time-out value of 60 minutes to write a message to the MessageBox database, the transaction times out, and an error occurs. Additionally, the attempt to write the message fails and is rolled back. You should increase the large message fragment size enough to avoid this problem when you process very large messages. Depending on the available memory, you should increase the large message fragment size to a value between 1 megabyte (MB) and 10 MB. Therefore, you should set the large message fragment size to a value between 1,048,576 bytes and 10,485,760 bytes.