msmq

message queue storage limit on a single queue doesn't work?

强颜欢笑 提交于 2021-02-10 18:44:11
问题 Send() doesn't throw exception when the queue is full. I have two private message queue, say queue and queue1, i set message storage of queue1 to a small amount say 5120 kb, in my program i send message to both queue and queue1, when queue1 is full while the global queue is not full, the Send() method on queue1 doesn't throw exception, why is this? i was expecting the send() method on queue1 throw exception so i know it is full. 回答1: I think this is by design: from MSMQ FAQ: MQSendMessage()

Does MassTransit support MSMQ over HTTP transport?

好久不见. 提交于 2021-02-07 23:52:13
问题 HTTP transfer has been available since MSMQ 3.0, however I'm afraid MassTransit doesn't offer the feature to use HTTP protocol as transport protocol between queues. There's a very similar question about this here, which has not been completely answered. Does anyone know if it's possible for a client to subscribe to a bus and send/receive messages through HTTP? Here's the architecture I'm willing to implement: I'll have 2 computers in the local network Computer A runs a server application and

Error 0xc00e0003 in MSMQ + WCF inside a Windows Service

狂风中的少年 提交于 2021-01-28 07:46:28
问题 I am hosting a WCF Service, that uses MSMQ, inside a Windows Service. Problem: After installing the service, I am unable to start the service. Event log has following information: Service cannot be started. System.InvalidOperationException: There was an error opening the queue. Ensure that MSMQ is installed and running, the queue exists and has proper authorization to be read from. The inner exception may contain additional information. ---> System.ServiceModel.MsmqException: An error

How does MSMQ manage messages?

冷暖自知 提交于 2021-01-27 06:53:02
问题 It seems that MSMQ doesn't use any Database management system to manage messages. How does MSMQ manage messages? Does it store the messages in flat file? I'm trying to implement a messages management system. 回答1: MSMQ uses flat files located in %windir%\system32\msmq. If you want to implement your own queueing, I suggest you take a look at Ayende's blog post on queueing 回答2: it stores them as files on the disk. If you wanna manage them use the System.Messaging API 来源: https://stackoverflow

C# 队列(Queue)安全队列 ConcurrentQueue 和MSMQ(消息队列)的基础使用

◇◆丶佛笑我妖孽 提交于 2020-03-30 15:24:18
原文:https://www.cnblogs.com/yanbigfeg/p/9674238.html#_label3 目录 Queue 命名空间 示例代码 效果展示 MSMQ 开启安装 命名空间 示例代码 效果展示 本机查看消息队列 补充感谢 ConcurrentQueue 首先我们知道队列是先进先出的机制,所以在处理并发是个不错的选择。然后就写两个队列的简单应用。 回到顶部 Queue 命名空间 命名空间:System.Collections,不在这里做过多的理论解释,这个东西非常的好理解。 可以看下官方文档:https://docs.microsoft.com/zh-cn/dotnet/api/system.collections.queue?view=netframework-4.7.2 示例代码 我这里就是为了方便记忆做了一个基本的例子,首先创建了QueueTest类: 包含了获取队列的数量,入队和出队的实现 1 public class QueueTest 2 { 3 public static Queue<string> q = new Queue<string>(); 4 5 #region 获取队列数量 6 public int GetCount() 7 { 8 9 return q.Count; 10 } 11 #endregion 12 13 #region

How to receive message from a private workgroup queue

ぐ巨炮叔叔 提交于 2020-01-31 18:18:26
问题 I have a private queue on a remote machine that everyone and the anonymous login have full access to. The following code produces and error when trying to receive: var qpath = @"FormatName:DIRECT=TCP:xx.xx.xx.xx\PRIVATE$\QueueName"; var q = new MessageQueue(qpath); var msg = new Message(); msg.AttachSenderId = false; msg.Recoverable = true; msg.Body = "hello"; q.Send(msg); // <-- this works! var recMsg = q.Receive(TimeSpan.Zero); // <-- this breaks! :| The Error message is: Message Queue

How to set permissions on MSMQ Cluster queues?

纵然是瞬间 提交于 2020-01-24 21:25:10
问题 I've got a cluster with functioning private MSMQ 3.0 queues. I'm trying to programmatically set the permissions, but can't seem to connect via System.Messaging on the queues. The code below works just fine when working with local queues (and using .\ nomenclature for the local queue). How to programmatically set the permissions on the clustered queues? Powershell code executed from the active node function set-msmqpermission ([string] $queuepath,[string] $account, [string] $accessright) { if

What's the recommended way for console applications to talk with each other?

只谈情不闲聊 提交于 2020-01-24 14:14:47
问题 I got a system of console applications written in C# running on different machines. I use MSMQ. My questions is, how do I make my console applications communicate to each other? I'm asking because I want to create a new console application that can be queried by other applications to know the number of messages in MSMQ. Edit 1: Thanks for the replies and comments! About the requirements, I'm estimating maybe about 10-50/sec of queries 回答1: You need to use a pipe to achieve this: see Named

MSMQ on Win2008 R2 won’t receive messages from older clients

你。 提交于 2020-01-24 08:24:27
问题 I'm battling a really weird problem here. I have a Windows 2008 R2 server with Message Queueing installed. On another machine, running Windows 2003 is a service that is set up to send messages to a public queue on the 2008 server. However, messages never show up on the server. I've written a small console app that just sends a "Hello World" message to a test queue on the 2008 machine. Running this app on XP or 2003 results in absolutely nothing. However, when I try running the app on my

with MessageEnumerator RemoveCurrent how do I know if I am at end of queue?

余生长醉 提交于 2020-01-24 04:25:28
问题 In MSMQ on .NET, I'm using a MessageEnumerator to look through all the messages in the queue. I want to remove messages that meet a certain condition. When I call MoveNext to step through the queue, I get back a boolean to tell me if the current message exists. But, when I do a RemoveCurrent, how do I know if the current message after the removal exists? Is the only way to check Current and handle the exception? Here is an example where I use the simple condition of removing messages that are