I've found solution .
let setRecoverySequenceNum (cbArg : obj) (cbInfo : UMERecoverySequenceNumberCallbackInfo) = let low = cbInfo.lowSequenceNumber() let low1 = cbInfo.lowRxReqMaxSequenceNumber() let high = cbInfo.highSequenceNumber() cbInfo.setLowSequenceNumber(Math.Max(low, high) ) (int)0
I’m not sure that solution will work for messages that are greater than 1 UM message fragment. For example, if I send 100 messages that are 100,000 bytes each, then I start a subscriber to late-join the last of those 100,000 byte messages, the “high” sequence number will be that of the last fragment that the store has, which is only a tiny piece of that 100,000 byte message. Therefore when you set the callback to only recover that fragment, the receiver will actually declare the message as unrecoverable loss, because it’s missing all the previous fragments.
Recovering a single message from the store is ultimately a difficult task because it’s not really what the store was designed to do. It can be accomplished if you know the size of all messages, then you can determine the number of fragments per message and calculate how many sequence numbers to ask the store for inside the sequence number info callback. Otherwise, like you had mentioned, you can request a block of messages and just not perform any application logic on them until you reach the latest message, which does add some overhead to the application.
Informatica does have a product that offers a last value cache feature, and that is UMCache.
For more information on UMP and the sequence number callback, I would highly recommend the following KB articles:
Of course, code I wrote is not solution.
It's just a glue. This code cut all messages to 1 datagram.
Need to set cbInfo.setLowSequenceNumber(Math.Min(cbInfo.lowRxReqMaxSequenceNumber(), high) )
After need to keep high number somewhere and when retransmitted message is received need to check sequence number.
Its not optimal, but gives some solution while we don't have UMCache.
As I understand UMCache requires additional license.