msmq

MSMQ receive with transaction - rollback not making message available again

狂风中的少年 提交于 2019-12-21 08:59:31
问题 I have this in a class called "MessageQueueReceive". public MessageQueueTransaction BlockingReceive(out Message message) { MessageQueueTransaction tran = null; message = null; tran = new MessageQueueTransaction(); tran.Begin(); try { message = Queue.Receive(new TimeSpan(0, 0, 5), tran); } catch (MessageQueueException ex) { // If the exception was a timeout, then just continue // otherwise re-raise it. if (ex.MessageQueueErrorCode != MessageQueueErrorCode.IOTimeout) throw ex; } return tran; }

How to read msmq messages (me, not the pc)

点点圈 提交于 2019-12-21 08:07:09
问题 I want to look inside my queues, the msm console snapin has this property dialog, but it is very difficult to read and the messages which are important to me are encoded and look like this: 3C 3F 78 6D 6C 20 76 65 <?xml ve 72 73 69 6F 6E 3D 22 31 rsion="1 2E 30 22 20 65 6E 63 6F .0" enco 64 69 6E 67 3D 22 75 74 ding="ut 66 2D 38 22 3F 3E 0D 0A f-8"?>.. 3C 65 73 62 3A 6D 65 73 <esb:mes 73 61 67 65 73 20 78 6D sages xm 6C 6E 73 3A 65 73 62 3D lns:esb= 22 68 74 74 70 3A 2F 2F "http:// 73 65 72

How to know programmatically whether Message Queueing is enabled on the machine or not?

非 Y 不嫁゛ 提交于 2019-12-21 08:00:13
问题 I know that when I try to create new MessageQueue , system throws InvalidOperationException if the Message Queuing is not enabled. But how to know programmatically whether Message Queueing is enabled on the machine or not? I am using C# 2.0 & C# 4.0 in two different code bases. 回答1: You can use the System.ServiceProcess for this one, but first you need to add reference to your project the Service.ServiceProcess , and you can retrieve all the services and get their status like this: List

c#. MSMQ .The max size of a single message

我们两清 提交于 2019-12-21 07:12:19
问题 Using msmq I want to send a message ( near 1 GB ). I want to send array of bytes . But I can send only 4 MB . How can I get around this limitation ? 回答1: As you know the maximum size of a message in MSMQ is 4Mb, its better to go for some other solutions. Solution : If you want to transfer data that exceeds this size, you will have to cut it into chunks in the sender's side, and recombine it in the receiver side. Why is there a 4MB limit on MSMQ messages? Check out this blog. How to send files

Message does not reach MSMQ when made transactional

自闭症网瘾萝莉.ら 提交于 2019-12-20 11:59:28
问题 I have a private MSMQ created in my local machine. I am sending messages to the queue using following C# code. When I changed the queue to be transactional, the message is not reaching the MSMQ. However, there is no exception thrown in the Send method. What change I need to make in order to make it working? using System; using System.Messaging; using System.Data; public partial class _Default : System.Web.UI.Page { //Sharing violation resulted from queue being open already for exclusive

to MSMQ or not to MSMQ? (or SQL Table as the Queue)

不想你离开。 提交于 2019-12-20 10:53:13
问题 I've got a distributed system where there will be 1 SQL Server, 1-n processing servers, and 1-n data suppliers (hardware devices across the network). The data being supplied will require processing prior to going into the relational DB structure - performed by the processing servers (as windows services - .net code to parse the data, process it, and insert it into the relational structure.) To handle the potential load and not slow down the data suppliers, I want to implement a queue, but I'm

Cannot determine whether a queue with the specified format name exists

我是研究僧i 提交于 2019-12-20 10:29:11
问题 I get the exception when executing the following code. Any ideas what is wrong? string queueName = "FormatName:Direct=TCP:1.1.1.1\\Private$\\test"; MessageQueue queue; if (MessageQueue.Exists(queueName)) queue = new System.Messaging.MessageQueue(queueName); else queue = MessageQueue.Create(queueName); queue.Send(sWriter.ToString()); Edit: Here is the exception message and first line of stacktrace Cannot determine whether a queue with the specified format name exists. at System.Messaging

Hi load server with load balancing, using WCF and MSMQ

不问归期 提交于 2019-12-20 08:52:32
问题 Currently I'm developing a spatial data processing server. Here are requirements: Server must be able to receive and handle about 150-200 small messages per sec(gps fix, some additional data). It must be scalable. For example to run on several machines and balance load itself(without nlb) Currently I have tested this kind of architecture: Incoming messages service,responsible only for getting messages into (without msmqwcf binding) Message parser service. Gets messages from msmq, parses them

How to setup MSMQ server so that it can be accessed over the Internet

▼魔方 西西 提交于 2019-12-19 10:29:38
问题 We have MSMQ on a Windows 2008 R2 server, with the followings Firewall settings: 1) Message Queuing is checked in 'Allow programs to communicate through Windows Firewall' 2) Enable TCP port: 2103, 2105, 1801 But when a c# application (using FormatName:DIRECT=TCP:xxx.xxx.xxx.xxx\Private$\q1) attempts to receive the private queue message, it encountered the following error: System.Messaging.MessageQueueException: Remote computer is not available. at System.Messaging.MessageQueue.MQCacheableInfo

Not creating queues automatically in NServiceBus

荒凉一梦 提交于 2019-12-18 11:51:51
问题 I'm running NServiceBus 3.0.0 rc2 but when I start the application (as local admin) without pre-creating the MSMQ's it errors with : The queue does not exist or you do not have sufficient permissions to perform the operation. This was not happening using NServiceBus 2.6. Below is my config: var bus = Configure.With() .Log4Net() .NinjectBuilder() .XmlSerializer() .DefiningCommandsAs(t => typeof(ICommand).IsAssignableFrom(t)) .DefiningEventsAs(t => typeof(IEvent).IsAssignableFrom(t))