大佬教程收集整理的这篇文章主要介绍了MSMQ FIFO/同步处理,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
Dim objQueue As New messageQueue(ConfigurationManager.AppSetTings("myQueuePath"))
AddHandler objQueue.ReceiveCompleted,AddressOf QueueReceived
objQueue.beginReceive()
Private Sub QueueReceived(source As Object,asyncResult As ReceiveCompletedEventArgs)
Dim mq = DirectCast(source,messageQueuE)
Dim objmessage As message = nothing
Try
mq.Formatter = New Xmlmessageformatter(New [String]() {"System.String,mscorlib"})
objmessage = mq.EndReceive(asyncResult.AsyncResult)
Dim strmessage As String = objmessage.body.ToString()
'Call routIne to read data,check for suplicates and then insert into database
ProcessBXRS(objmessagE)
Catch ex As Exception
'Do some exception handling
End Try
'Listen for next message
mq.beginReceive()
End Sub
以上是大佬教程为你收集整理的MSMQ FIFO/同步处理全部内容,希望文章能够帮你解决MSMQ FIFO/同步处理所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。