When a message is corrupted in the EMS database, you may notice the following errors in the EMS log file:
SEVERE ERROR: Exception trying to read message from store.
ERROR: Exception trying to create message from store: IO failed.
SEVERE ERROR: Exception trying to create valid messages record, Invalid message.
SEVERE ERROR: Persisted message possibly corrupt.
SEVERE ERROR: Exception trying to create valid messages record, Invalid message.
When your client tries to consume the message, you may get a “javax.jms.JMSException: Corrupted incoming data message” exception.
When a corrupted message is sent to a client and the client application cannot process the corrupted message properly, the client will block successive messages sent to it. These messages will remain queued on the server and will not be consumed by the client.
Possible Reasons for Generating Corrupted Messages in the EMS Datastore
1. A hardware problem with the physical disk: Media error
2. Forced unmount of a physical disk when the disk is in use, or a hard disk in operation having been unplugged.
3. Locking problem, the record in the db file has been modified by different applications/threads of the application at the same time.
4. The EMS server receives a corrupt message.
5. The machine was terminated abruptly. For example: a running system in operation has been unplugged, etc.
Solution
When one or more messages are corrupted and a client cannot receive the corrupted messages, you can do the following to delete the corrupted messages:
1. If you have already enabled the “track_message_ids” then you should try to remove the corrupt message as follows. To enable track_message_ids, in EMS main configuration file, set: in tibemsd.conf
track_message_ids=enabled.
a) Use the tibemsadmin command (available in EMS_Home\bin directory) to set server console_trace = +MSG (or set log_trace if that is more appropriate).
b) Use the tibemsadmin command to set addprop queue trace.
c) When the server delivers the corrupted message to the consumer, the server should print the message ID.
d) Use the tibemsadmin command “delete message” with that message ID to remove the corrupted message.
e) Undo steps a) and b), if needed.
For training on TIBCO EMS mail us at [email protected]