B
Bob Clegg
Hi,
First venture into using MSMQ
Prog A owns queue and is receiving.
Prog B detects queue and sends message
Prog B appears to be working in that I can see the messages being created in
the Message console.
Prog A detects the message but I cannot get it to deserialise it.
It errors with 'Can't deserialise unknown format ' or words to that effect.
I just want to send the string "E".
In the message write I started simple with
myQue.send("E")
That didn't work so I went
to using an ActiveXFormatter to send and receive.
Result is still the same.
The help file indicates that you should be able to simply treat the body
like a string but my attempts to coerce it into a string have failed.
Any help on this would be appreciated.
Current code snippets follows.
Thanks
Bob
ProgA (RECEIVER)
Static qe As MessageEnumerator = q.GetMessageEnumerator
Dim msg As Message
qe.MoveNext()
Dim f As New System.Messaging.ActiveXMessageFormatter
Dim m As Object
msg = qe.RemoveCurrent
m = f.Read(msg)
ProgB (TRANSMITTER)
Dim mq As MessageQueue
Dim m As Message
m = New Message
Dim strMessage As String = "E"
Dim f As New System.Messaging.ActiveXMessageFormatter
f.Write(m, strMessage)
For Each mq In mqEvents
mq.Send(m)
Next
First venture into using MSMQ
Prog A owns queue and is receiving.
Prog B detects queue and sends message
Prog B appears to be working in that I can see the messages being created in
the Message console.
Prog A detects the message but I cannot get it to deserialise it.
It errors with 'Can't deserialise unknown format ' or words to that effect.
I just want to send the string "E".
In the message write I started simple with
myQue.send("E")
That didn't work so I went
to using an ActiveXFormatter to send and receive.
Result is still the same.
The help file indicates that you should be able to simply treat the body
like a string but my attempts to coerce it into a string have failed.
Any help on this would be appreciated.
Current code snippets follows.
Thanks
Bob
ProgA (RECEIVER)
Static qe As MessageEnumerator = q.GetMessageEnumerator
Dim msg As Message
qe.MoveNext()
Dim f As New System.Messaging.ActiveXMessageFormatter
Dim m As Object
msg = qe.RemoveCurrent
m = f.Read(msg)
ProgB (TRANSMITTER)
Dim mq As MessageQueue
Dim m As Message
m = New Message
Dim strMessage As String = "E"
Dim f As New System.Messaging.ActiveXMessageFormatter
f.Write(m, strMessage)
For Each mq In mqEvents
mq.Send(m)
Next