I guess you could manually handle the eventhub listener after transaction is detected, like call close(). otherwise it will persist in thread pool and hang your program
发件人: fabric@... <fabric@...> 代表 Juyuan Cai <juyuancai@...>
发送时间: 2018年12月19日 15:30
主题: [Hyperledger Fabric] #fabric-questions #fabric-sdk-java will fabric sdk event listener get all commit peers call back?
I am using Fabric-1.3 and java sdk. Everything goes fine, but a tiny question. For now, I have two peers. I use txlistener to listen to event when transaction is written to peer's ledger. So my question is, Since I have two peers, will sdk wait for all peers' call back result, and then give a notification that the transaction has been written to peer's ledger, or once sdk get one peer's call back,it will give a notification that the transaction has been written to peer's ledger ? I did many tests, it seems just need one peer's call back because I only got one peer's result randomly from the sdk's side if I use debug mode. However, the sdk would still wait until timeout if I shut one peer down. So That makes me very confused, could any one help me about this? Thank you very much!