Contents

A large message is defined as a JMS Message with a reference to a large sized file. Message fragmentation, reassembly, sequencing, duplication, and recovery are handled internally. When the large message is sent, it is only the reference to the large file that is sent with the JMS Message. The actual file transfer happens only after the receiver has received the JMS message containing the reference to the message and starts the saveTo operation on it.
Transferring a large message using Fiorano LMS involves the following phases:

  • Message creation
  • Starting the message transfer
  • Tracking the message transfer
  • Handling exceptions in the message transfer
  • Resuming the message transfer

Message Creation

The large message is created using the complete JMS semantics. A JMS application can specify a string property; "JMSX_LM_PATH" to convert a JMS message to a large message. This string property specifies the absolute path of the large file that needs to be sent to the listening consumers. A consumer receives the large message just like any other JMS message.

Starting the Message Transfer

The large message transfer can be initialized by calling the normal JMS send call at the producer end. This posts the large message to the intended destination (queue/topic), which is received by the listening consumers. They receive this large message and can start the actual transfer of the large file by opting to save this message at the required location using the saveTo API.

Tracking the Message Transfer

Message transfer can be tracked asynchronously by registering the status listener with every large message. The status listener can be set using the setLMStatusListener API.

Handling Exceptions During Message Transfer

Exceptions can be handled using the status listener registered with the large message. When an exception occurs while transferring the large message, the application is notified via the registered status listener. Applications can check the type of error and status of the transfer and can decide to resume/cancel the message transfer.

Resuming the Message Transfer

If a failure occurs while transferring the message, the application can resume the message transfer from the state at which the failure had occurred. The application can resume the message transfer from the two levels described below:

  • Resume on exception: FioranoMQ notifies the application about the status of the message transfer using the registered status listener. If an exception occurs during message transfer, FioranoMQ notifies the application about the failure. Upon failure notification, the application can opt to resume the message transfer. It can resume the transfer using the resumeSend () or resumeSaveTo () APIs provided in the message object.
  • Resume on startup: The JMS Connection object keeps track of all active message transfers for a particular connection. If the application becomes unavailable (JVM down) while participating in the message transfer, it can then check the list of unfinished transfers from the connection object. The connection object provides a list of unfinished messages required to be sent and received. The application can resume the transfer using the resumeSend () or resumeSaveTo () APIs provided in the message object.
Adaptavist ThemeBuilder EngineAtlassian Confluence