MSMQ: How can I create a private queue on a remote computer - c#

I need to create a Private message queue on a Remote computer. All me research indicates this is not possible through the System.Messaging objects. Can anyone confirm/deny this. My other option is to create an addition service on the remote host that listens for requests to create queues and then creates them locally.
Any better/simpler ideas would be welcome.

You can't and you shouldn't.
MSMQ works like a mailbox, you only have to create an inbox, the outbox is created by MSMQ itself.
Indeed just create a sperate service that creates the queue on the remote machine, by installing it localy.

You can't and its annoying. MSMQ is strange in the windows environment. there are allot of differences about what you can do locally and remotely. There is nothing reasonable to do about it. Just live with it.

Related

Confusion about RabbitMQ and MQTT in C# environment

I Am trying to play with MQTT and RabbitMQ but with some problems.
Introduction
I have several physical machines that generate data and I want to do something with this data, for simplicity imagine that I just want to write those messages to a separate file for each machine identified by an ID. (do not focus on the details, it is just an example)
What I have
I have an MQTT broker (i.e. mosquitto broker) that handles several messages coming from those machines.
I have a (complex) windows service written in C#. An object instantiation exists for each machine (i.e. machine with id = 1000 leads to an object that represents the physical machine in the service program and so on). This machine object has a RabbitMQ queue of messages that contains every message that is delivered by the machine.
The problem
How can I populate this queue?
I thought that there was the possibility, of using the rabbitMQTT plugin, to instantiate an exchange or something similar to listen for the MQTT topics and to forward the received messages to the appropriate queue as usual, but I cannot find anything on the net.
I hope I've been clear enough in proposing the problem that I Am facing.
Assume that I MUST use RabbitMQ since it is already used for the communication of the different modules of the service.
Hope you can help me understand if there is any possibility to use RabbitMQ to listen for messages from an external MQTT broker that I cannot decide on and then push those messages in an exchange that will route the message based on the routing key extracted from the message.
Practical case:
Real-world machine 10000 produces a message A
Real-world machine 10000 publishes on topic machines/10000 the message A
The service (that is subscribed to the machine/# topic) gets the message A
The service publishes message A in the exchange with routing key machines.10000
The machine 10000's callback processes the message A and does something
Thanks, please be as clear as possible since I need to understand the entire process (if possible)

job queue in windows service

I need to create a windows service that processes a job queue.
A trigger will fill up the queue, and the windows service will process that queue.
I know how to create a windows service (using a timer), but I'm not sure about how tell the trigger (CLR project) to fill the queue, and how to process it.
I'm new in C#, so any example, ideas, guidances are wellcome
Thank you
Sounds like you need a MQ (message queueing) system. Try looking into this (RabbitMQ) as a starting point, then update your question with specifics if need be.
http://www.rabbitmq.com/tutorials/tutorial-one-dotnet.html
Here is Microsoft's implementation of it (MSMQ):
http://msdn.microsoft.com/en-us/library/ms711472(v=vs.85).aspx
Thank you Bill Sambrone.
I found SQL Server Service Broker (http://technet.microsoft.com/en-us/library/ms345108%28v=sql.90%29.aspx)
It is a service that uses queues to send messages that are guaranteed to arrive to destiny, it can send messages between databases, remote databases, and also to external apps. I'm sending the messages to my c# external app. And the best is that it comes bundled inside SQL server.

MSMQ: Remote message queue access

It is possible have one MSMQ queue in one machine and read masseges from that queue from another machine?
If yes, what is the path i should use in Create method from MessageQueue class?
Thanks
It's definitely possible to read messages from a queue on another machine, depending on which version of Windows you're running. It seems you're also asking if it's possible to create message queues on another machine. According to the documentation here, you simply use the format "MachineName\Private$\QueueName" for a private queue or "MachineName\QueueName" for a public queue.
In my experience, getting the permissions set up to allow remote message queue reading is a bit tricky; getting the right permissions set for allowing the creation of message queues might be even trickier. You may want to consider using pre-created message queues.

Why aren't clients running against the same publish/subscribe service getting each other's messages?

I'm trying to implement publish/subscribe through WCF. My problem is that multiple clients originating from 1 computer work as expected, but clients on another box on the same network don't get the messages.
I'm following this blog tutorial: http://chakkaradeep.wordpress.com/2007/07/30/coding-wcf-publishersusbcriber-model/
I'm hosting the WCF service on an IIS box on my network, and running multiple instances of the test client on 2 separate network machines. 1 machine can bounce messages off the server without problem, but the other machine's clients should be receiving these messages and they just aren't. Is there a specific config flag I need to be setting to allow what it is I want?
You can take a look at the code for my project nvents, or simply use it as is.

Subscribing to MSMQ over the internet

I haven't been able to find a clear answer to this problem. Is there a good way to subscribe to a MSMQ through the internet? Ideally I need security both in authentication and encryption for this connection. But I would like the subscriber to act just like any other client that would be subscribed on the local network. I believe I have a couple of options here
Expose the MSMQ ports publicly
Put the MSMQ behind some type of WCF service (not sure if that works for a subscriber)
What other options do I have? We're sitting in a .NET environment and the main problem domain that is trying to be solved is to change the remote connections from a pulling system to an event based system to reduce the load on the main server.
One way is to use a queue ON the Internet.
I work at Microsoft and my team owns MSMQ and we also own the Windows Azure Service Bus service. For the scenario you describe you may want to take a look at using a Service Bus Queue, which has not only the advantage of being reachable for Internet senders but also eliminates the need to create inbound firewall rules on the receive side.
More here: http://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-queues/
The most natural option will be to use MSMQ over http, which is a feature of MSMQ:
http://msdn.microsoft.com/en-us/magazine/cc164041.aspx
The alternative would be to create an http WCF service possibly with duplex polling and use WS-Routing to an MSMQ WCF service.
Checkout the Gateway feature of NServiceBus.

Categories

Resources