Updating JMSXDeliveryCount in message header by the EMS server.

Updating JMSXDeliveryCount in message header by the EMS server.

book

Article ID: KB0089348

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Resolution:
Description:
==========

There is the following information in the EMS User's Guide regarding JMSXDeliveryCount:

------
In the event of an abrupt exit by the client, the maxRedelivery count can be mistakenly incremented. An abrupt exit prevents the client from communicating with the server; for example, when the client exits without closing the connection or when the client application crashes. If a client application exits abruptly, the EMS server counts all messages sent to the client as delivered, even if they were not presented to the application.
------


Resolution:
===========

When messages are sent to a session due to the queue's prefetch property, any action that would cause a rollback of those messages would cause them to be marked as redelivered (JMSXDeliveryCount is a positive integer or is increased). EMS clients and server ensures that only messages actually received by the application are called on the message. Those not prefetched by the client will be considered redelivered and have their JMSXDeliveryCount increased in the case of a "normal" rollback event which is explicitly generated by the application:

- Calling session.recover or session.rollback.
- Closing a connection for instance.


If an application exits abruptly before it can close the connection (i.e., crash, CTRL+C on the application), then the correct JMSXDeliveryCount is not guaranteed.



Issue/Introduction

Updating JMSXDeliveryCount in message header by the EMS server.