I have 2 instance of my Java application (A & B) running on same machine, where B is blocked for activate()
callback.
This is how I register my callback:
new TibrvFtMember(this.tibrvQueue,
this.orv,
this.transport,
MessagingProps.TIBCO_GROUP_FT, // Group name
wt, // Weight
1, // Active members
2.0, // Heartbeat (secs.)
0.0, // Prep. (secs.)
2.5, // Activation (secs.)
null);
I sending heartbeat every 100 millisecond to ensure that my application is on time.
msg.add("Data", ++seq + ":" + MessagingProps.TIBCO_SUBJECT_FT);
msg.setSendSubject(MessagingProps.TIBCO_SUBJECT_FT);
transport.send(msg)
For some reason (ex., GC / garbage collection) if my active application "A" delays in sending heartbeat, immediately my passive application "B" gets activated while "A" is still active, where deactivate is not invoked on "A". And soon after application "A" sending a heartbeat, deactivate is invoked on application "B". This give an erroneous behavior for a few seconds since both the applications are active at the same time.
The mentioned is happens at random time and not predictable. Our application cannot publish duplicate messages at same time, so this creates a huge impact.
Kindly help me to how can I overcome this issue.