if quickfixj crash in onmessage, will I lose my current message?

蓝咒 提交于 2020-01-17 01:35:29

问题


Need to understand if my initiator received a message but crashed inside onMessage function, will I still restart with reset the sequence number that I was processing while crashing, and receives it again? so I don't lose the message? At what point does the seqnum got incremented, when the process goes out of the onMessage function?


回答1:


As per code if QuickfixJ, it increments the nextSeqNum to received after processing of onMessage callback. So if there is an exception in onMessage then nextSeqNum to received would not be incremented. Then while receiving the next message, there would be a gap in sequence number and Quickfixj will automatically send the resend request.

You can go through the code, here: https://github.com/quickfix-j/quickfixj

You can still change the behavior using config: "RejectMessageOnUnhandledException

for documentation please refer: https://www.quickfixj.org/usermanual/1.6.1/usage/configuration.html

Let me know if you need more guidance.



来源:https://stackoverflow.com/questions/50651556/if-quickfixj-crash-in-onmessage-will-i-lose-my-current-message

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!