Good day.
I have an existing application which required add on, on send real time message to kafka.
All working fine. But while user login the time take is more than normal on access class file of send message to kafka and then return result and go to main page. To overcome it, i tried to use Async method where once the class file of kafka is accessed, as no need to wait for the result and just redirect to main page but it’s still working as sync.
Please guide me thru and where i do wrong.
Note* Have tried the method as below as well: https://learn.microsoft.com/en-us/dotnet/visual-basic/programming-guide/concepts/async/?redirectedfrom=MSDN
Private Async Sub btnLogin_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnLogin.Click
' Other code...
Dim objKafka As New clstoKafka.clsKafka
Await objKafka.ProcessKafkaMessageAsync(jsonData, formattedDate, formattedTime, Login_ID)
' Other code...
End Sub