This is the first time I have used this messaging library and used some example code to implement it. The first time I ran it it worked perfectly but I abruptly stopped the code since my parsing method seemed wrong. So when I restarted it, the code freezes at the following line:
message = q.Receive()
Is it possible the message queue got corrupted or something? I checked the server manager and it looks like the queue is still there and number of messages =1 as before. Here is the rest of my code:
If MessageQueue.Exists(".\private$\TwitterQueue") Then
q = New MessageQueue(".\private$\TwitterQueue")
Else
'GS - If there is no queue then we're done here
Console.WriteLine("Queue has not been created!")
Return
End If
Try
While True
'GS - Try and pull back the next message
Dim message As Message
Try
message = q.Receive()
message.Formatter = New XmlMessageFormatter(New [String]() {"System.String"})
ProcessMessage(message)
Catch
end try
End While
EDIT:
how queue is created:
Dim q As MessageQueue = If((MessageQueue.Exists(".\private$\TwitterQueue")), New MessageQueue(".\private$\TwitterQueue"), MessageQueue.Create(".\private$\TwitterQueue"))
and how it is used:
Dim msg As New Message(responseData)
q.Send(msg)
and just checked if it was transactional;
If q.Transactional = True Then
Thread.Sleep(2000)
End If
and it is not.