I am using Java SDK based client for the Hyperledger fabric and i am trying to register and listen to BLOCK and CHAINCODE events. I want to create a separate thread for this.
HFClient client = HFClient.createNewInstance();
Channel channel = client.newChannel("channel01");
EventHub eventHub = client.newEventHub("eh01", "grpc://abc.xyz.us:7053");
channel.addEventHub(eventHub);
Can someone tell me what to do next?