msmq

WCF MSMQ Unit testing

馋奶兔 提交于 2019-12-10 10:27:23
问题 I have created a custom msmq service with WCF, which uses a custom binding as it needs to do some custom logic at the channel layer, where it calls another wcf service. The service is going to be a core pience of functionality for our systems for at the the next few years. i want to do what I can to make sure the service is robust, but, i'm not sure where to start. Ie testing the response, should I create a mock queue object? how do I test the service is calling another service ? 回答1: Best

MSMQ, WCF, and Flaky Servers

て烟熏妆下的殇ゞ 提交于 2019-12-10 09:41:09
问题 I have two applications, let us call them A and B. Currently A uses WCF to send messages to B. A doesn't need a response and B never sends messages back to A. Unfortunately, there is a flaky network connection between the servers A and B are running on. This results in A getting timeout errors from time to time. I would like to use WCF+MSMQ as a buffer between the two applications. That way if B goes down temporarily, or is otherwise inaccessible, the messages are not lost. From an

Is there a better way to count the messages in an Message Queue (MSMQ)? [duplicate]

白昼怎懂夜的黑 提交于 2019-12-10 04:10:34
问题 This question already has answers here : Is there a way to check how many messages are in a MSMQ Queue? (9 answers) Closed 5 years ago . I'm currently doing it like this: MessageQueue queue = new MessageQueue(".\Private$\myqueue"); MessageEnumerator messageEnumerator = queue.GetMessageEnumerator2(); int i = 0; while (messageEnumerator.MoveNext()) { i++; } return i; But for obvious reasons, it just feels wrong - I shouldn't have to iterate through every message just to get a count, should I?

MSMQ Receive() method timeout

送分小仙女□ 提交于 2019-12-10 01:21:40
问题 My original question from a while ago is MSMQ Slow Queue Reading, however I have advanced from that and now think I know the problem a bit more clearer. My code (well actually part of an open source library I am using) looks like this: queue.Receive(TimeSpan.FromSeconds(10), MessageQueueTransactionType.Automatic); Which is using the Messaging.MessageQueue.Receive function and queue is a MessageQueue. The problem is as follows. The above line of code will be called with the specified timeout

How to Purge an MSMQ Outgoing Queue

可紊 提交于 2019-12-09 17:46:33
问题 Is there any way to purge an outgoing queue. It doesn't appear that I can do it with the MMC snap-in and when i try to purge it in code i get an error Format name is invalid the computer it's sending the messages to does not exist, so they will never be sent, however the queues filled up the max storage space for MSMQ so everytime my application tries to send another message i get the insufficient resources exception. I've tried the following formats and they all fail with the exception

How does MSMQ Transactional Message Delivery work?

瘦欲@ 提交于 2019-12-09 17:25:10
问题 Just wanted to get confirmation on how sending messages to remote transactional message queues works. Suppose I have a two machines, A and B. Machine A has a transactional queue that is used for receiving messages. A windows service monitors this queue and does something with the data (persists it to a SQL Server). Machine B is running an application that needs to write to the queue on Machine A. A few questions: When sending the message, is a local copy created on Machine B, before it gets

MSMQ messages disappear from outbound queue but never arrive in the inbound queue

二次信任 提交于 2019-12-09 13:20:49
问题 I have a strange issue setting up an existing application on our new internal Cloud. I have a simple messaging system that pushes a message from one server (Server1) onto a MSMQ on another server (Server2). The messages disappear off the outbound but never appear in the inbound queue. When I take Server2 msmq off line the messages build up on Server1. Restarting Msmq on Server2 causes the messages in the outbound queue on Server1 to disappear - but the message still never arrives at Server2.

How to implement a competing consumer solution?

假如想象 提交于 2019-12-09 08:56:00
问题 As a exercise I'm trying to find an example which implements competing consumer. many producers - > MSMQueue <- competing consumers So far I did not find any documentation on how to achieve this. My first attempt to figure out how is implemented in MassTransit or NServiceBus failed to many layers of indirection. Any help will be greatly appreciated. 回答1: With MassTransit and MSMQ you can achieve this using the Distributor component. Note that if you use MassTransit with RabbitMQ instead of

Private or Public MSMQ

喜你入骨 提交于 2019-12-09 03:33:44
问题 We are using Queue for few of are WCF services. We are using NetMSMQ binding for the WCF services which use Private MSMQ. The system works OK on our QA environment. I am not sure of any real difference between and private or public queue. The client application are on seperate machine still are able to access Private queue of the WCF service on other box. I am not sure if this is the right thing to do. are there any security related differences between private and public MSMQ. Can someone put

Using multicast queues in System.Messaging and MSMQ 3.0

馋奶兔 提交于 2019-12-08 23:54:34
问题 I am trying to use MessageQueues to notify users of an application of data changes using the Multicast feature, but can't get it to work : the workstation that sends the message does receive it, but none of the other running workstations seem to catch the sent message. Sending messages is done as follows : Dim sendQueue As New Messaging.MessageQueue("FormatName:MULTICAST=234.1.1.1:8001") Dim message As New Messaging.Message("message body...") sendQueue.Send(message) And receiving them : Dim