Unsubscribe Now to stop receiving messages, you just need to call ‘unsubscribe’ method as follows: cometClient.unSubscribe();