Description
The NMSPersistent field is too limited to support variations from different brokers. The minimum is that a message in either persistent or it isn't. However, TIBCO adds a third proprietary optimized delivery mode called ReliableDelivery. The NMSPersistent field should be deprecated in favor of a new NMSDeliveryMode enumeration as follows:
enum MsgDeliveryMode { Persistent, NonPersistent } // ... SNIPPIT ... interface IMessage { [deprecated] bool NMSPersistent { get; } MsgDeliveryMode NMSDeliveryMode { get; } } interface IMessageProducer { [deprecated] void Send(IMessage message, bool persistent, byte priority, TimeSpan timeToLive); void Send(IMessage message, MsgDeliveryMode deliveryMode, byte priority, TimeSpan timeToLive); [deprecated] void Send(IDestination destination, IMessage message, bool persistent, byte priority, TimeSpan timeToLive); void Send(IDestination destination, IMessage message, MsgDeliveryMode deliveryMode, byte priority, TimeSpan timeToLive); [deprecated] bool Persistent { get; set; } MsgDeliveryMode DeliveryMode { get; set; } } // ... END ...
This will make the code more self-documenting as well as supporting broker implementations of proprietary delivery modes.
The NMSPersistent field should be marked as [deprecated] and then removed in the following version. This will allow users of the NMS library time to update their code, since this would be a breaking change and should be carefully approached as it has the potential to affect business logic requirements.