Read message from desktop MSMQ queue.

D

Dariusz

Can I read messages on a device from desktop queue?
I want to implement eventing of rarely connected devices.
Is MSMQ properly way for this solution?


Best Regards
Darek
 
I

Ilya Tumanov [MS]

No you can not. You can on desktop, but that's considered bad practice as it
degrades "store and forward" MSMQ to ordinary pull solution.

If pull solution is what you want, simply use Web Services instead. That can
be combined with MSMQ if needed.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
D

Darek

Thanks for answer.

I can't use web services because:
1. I won't use IIS
2. WSE-Eventing is hard to implement on device.
3. I think that I would have to implement web service server on device or use timer to periodically request desktop server (downgrade performance).

This is my scenario:
1. I have rarely connected devices with client applications.
2. I know devices IP?s on server.
3. I want implement:
a. Sending orders to devices without request form client.
b. Queuing orders on server while device isn?t connected.
c. Sending orders to connected devices.

What is the best solution for this scenario?


Best Regards
Darek
 
P

Paul G. Tobey [eMVP]

You might be able to write a MSMQ program on the desktop to write to a
device queue (I can't remember for sure if you can do this or not). When the
device attaches, it can read its own queue. As I said, you can write to a
desktop queue from the device, so that would be the means of communicating
in that direction. So, two queues, one on each device, read by the local
machine and sent to by the remote machine. If *all* you want is the items
you listed, you'd just have a queue on each Windows CE device and the server
would write to each queue with each order that it wanted to send out.
Connected devices would receive those orders very soon after they were sent
and unconnected ones would get them shortly after being connected.

I'd try to use MSMQ before anything else. You might run into something that
you can't get around without implementing your own queuing system and a
means to get to it, but it would be nice not to have to handle the
intermittent connectivity and queing yourself.

Paul T.
 
I

Ilya Tumanov [MS]

If you won't use IIS that means you won't use SRMP mode on MSMQ (which works
through IIS).

That means your solution if for LAN (or VPN), not internet, is that right?
In that case it's all very simple: use MSMQ.

Device would send messages to the queue on desktop (regardless if currently
connected) and desktop would send messages to queue on device (also does not
matter if device is online at the moment).



Take a look at this sample:
http://msdn2.microsoft.com/en-us/library/ms180970.aspx



By the way, reading from remote queues implies you would have to
periodically check for messages (pull).


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 
D

Dariusz

Yes, this is solution for LAN.

Correct me if I am wrong.
When I write messages to device queue from desktop and device is unconnected, MSMQ enqueued those messages on desktop.
If device connects, MSMQ will send data automatically to device and I can read this data form device queue.
I must test it.

Thanks for response.


Best Regards
Darek
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top