Menu
  • HOME
  • TAGS

MSMQ - message body is unreadable

c#,wcf,msmq

Queue Explorer has solved the problem: http://www.cogin.com/msmq/QueueExplorer/QueueExplorer2.2.php Solution was suggested at http://stackoverflow.com/a/2962080/1131855...

NServiceBus Worker checking in with capacity of 0

msmq,nservicebus

I had the same problem and was able to resolve it by deleting the queues (myfromqueue and myfromqueue.retries) on the worker agent. NServiceBus automatically recreated the queues and everything started processing again for me.

Masstransit: Can it use central msmq server? (Or should I start w/RabbitMQ from the start?)

rabbitmq,msmq,masstransit

First off I always suggest people use RabbitMQ over MSMQ unless you MUST use DTC for some reason. And even then, I'd suggest you rethink using DTC. But given you have some constraint you can't fight. You're welcomed to use a central MSMQ server but it doesn't provide a ton...

Calling Close() or Dispose() on MessageQueue does nothing

c#,msmq,dispose

Close or Dispose only work for your instance of the message queue C# object. They do not affect the actual message queue. The same way that disposing a database connection will not automatically remove the whole database from the server. You need to use the static Delete method of MessageQueue....

Gathering distributed data into central database

wcf,rabbitmq,msmq,zeromq,dds

From what I understand, you have basically two problems: Potential for loss/corruption of call data Database write performance The potential for loss/corruption of call data is being caused by a lack of reliability in the transmission of data from client to service. And it's not clear what is causing the...

Does Rebus support using MSMQ over HTTP/HTTPS?

msmq,rebus

With the existing MSMQ transport, Rebus does not support MSMQ over HTTP/HTTPS. Rebus will always use ordinary private MSMQ queues, and you specify queue names like this: <add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="myqueue.input" /> to map the messages to a local myqueue.input queue, or <add messages="MyNameSpace.MyMessage, MyAssembly" endpoint="[email protected]" /> to map the...

How to extract a propertybag or complex object send from VB6 through MSMQ in C#

c#,vb6,msmq,propertybag

I've dealt with this type of problem before and the best solution that I've found is actually to serialize the object into XML - afterwards it doesn't matter what language/platform you use to encode/decode the language as in text format you will always have options. In binary format you are...

WCF MSMQ order of handling requests

c#,wcf,msmq

You need to check InstanceContextMode and ConcurrencyMode properties of ServiceBehavior. My guess is that you want to set ConcurrencyMode.Single and InstanceContextMode.Single after which service could exist only in one instance and the other threads will wait while some thread is executing service method. But be aware, that is the slowest...

nservicebus: events and dead letter queue

events,msmq,nservicebus,dead-letter

When using NServiceBus, events are considered just as important as commands, and thus are subject to the same guarantees regarding durability, delivery, etc. So, if your subscriber does not care about events when it is offline, it could unsubscribe before shutting down - this way, it's an explicit decision made...

What happens when my application consumes an MSMQ message but then fails?

c#,.net,message-queue,msmq

Ok, so I finally found an answer: you can use transactions on the Receive() call just as you can on the Send() call. You can then abort the transaction and it will be rolled back, leaving the message in the queue (provided, of course, that you use a transactional queue)....

MSMQ receives messages only from some Clients

wcf,msmq

The problem comes through cloning the server as described in this blog entry: http://blogs.msdn.com/b/johnbreakwell/archive/2007/02/06/msmq-prefers-to-be-unique.aspx Basically it says there that you must not clone servers with MSMQ feature turned on. If you do so you either have to re-install the MSMQ feature on your client machines or do a registry change:...

Prism event aggregator Persistent Events

c#,wcf,events,prism,msmq

I posted this question on codeplex forum and got the answer from Bryan Noyes. It is: I'm afraid you are cleanly outside what Prism pub-sub events were designed for. They were designed for loosely coupled components that are all in memory at the same time on the client side but...

MSMQ to WCF - automatic notification

wcf,msmq

What is it that you're trying to achieve? There is really no such thing as "be notified when a message is pushed on MSMQ". MSMQ uses a pull model to retrieve messages from a queue, so there always needs to exist some kind of "listener" that reads messages from the...

How to make a method accessible to one user at a time in c#

c#,asp.net,singleton,msmq

Msdn got good explanation, check documentation. Thread Synchronization Since you have a static method, you need static Object for locking. public class Calculator { private static System.Object lockThis = new System.Object(); public static void Add(int a, int b) { lock (lockThis) { return a+b; } } } That lock means,...

C# MSMQ Invalid Operation Exception

c#,message-queue,msmq,invalidoperationexception

Problem is you're applying custom message formatter when sending, but not when receiving. If you investigated that exception a bit further you would probably see more details in inner exception, something like: "Cannot find a formatter capable of reading this message." Fix is simple. Just set that same formatter on...

WCF Service Not Reading Messages in Queue

wcf,msmq,msmq-wcf

This situation seemed just too odd. It didn't make sense that WCF would do nothing at all. I eventually decided to simply try restarting the MSMQ service on the server. Once I did that, my service immediately picked up the messages and everything started working again. I have no idea...

How can I remove messages from a queue?

c#,msmq

There is no API available to do this. But you can use GetMessageEnumerator2() and RemoveCurrent() A benefit of using enumeration is that if a queue has many messages, reading all of them may result in OutOfMemoryException. With enumerator you only read 1 message at a time, and memory allocated for...

Why do I need to use WCF to consume an MSMQ?

c#,wcf,asp.net-web-api,msmq

Other than WCF's netmsmqBinding, you could also obviously use the more native System.Messaging.MessageQueue .Net classes to read and write directly from queues. However, it sounds like you are trying to pull messages from a client such as a browser? Although you can send messages to MSMQ via Http, you can't...

ServiceStack vs NServiceBus [closed]

c#,redis,servicestack,msmq,nservicebus

Having no knowledge of how ServiceStack does pub/sub with Redis beyond what is in the docs, it appears that it is just providing a fairly thin wrapper around the Redis pub/sub API. NServiceBus (of which I am the original author) has a deeper architectural philosophy around pub/sub, including requiring the...

Clearing Dead Letter Queue

msmq

To clear manually, you need to right click the queue, then select All Tasks->Purge.

Reading MSMQ Messages in Raw XML

c#,xml,msmq

Try this: msg.Formatter = new ActiveXMessageFormatter(); reader = new StreamReader(msg.BodyStream); var msgBody = reader.ReadToEnd(); // This gets the actual message as text Formatters do not need to be symmetric - you can have different formatters on either end of the queue. From here - http://andypiper.co.uk/2006/03/31/receiving-plain-text-messages-in-msmq/...

Using MSMQ to Store Data before Processing

vb.net,url,msmq

MSMQ is a transport protocol. It is designed to get data from A to B as fast and as reliably as possible. As it uses store-and-forward, it can be used as a data buffer at the sender. In your case, though, that's not important. I would recommend: ISP sends MSMQ...

Is there no Async implementation of MSMQ send in .net 4.5

.net,c#-4.0,.net-4.5,msmq

There should be no need for an asynchronous version of Send because Send is asynchronous. From MSDN Sending messages in Message Queuing is always an asynchronous operation. When you are sure the queue is open, you can continue to send messages without stopping to wait for a reply. Even for...

MSMQ messages disappear when they get to remote server

msmq,system.messaging

The sender domain account needs to have the following permissions on the remote queue: Send, Get Permissions, Get Properties Are these machines on the same domain? If not you may need to grant the above permissions to the local user called ANONYMOUS LOGON...

Nservicebus communication between transports

sql-server,msmq,nservicebus

Take a look at the "SqlBridge" sample located here and the readme explains how to do this. https://github.com/particular/nservicebus.sqlserver.samples

How can I target my message to a specific URL using MassTransit and MSMQ?

c#,asp.net,asp.net-mvc,msmq,masstransit

There's an endpoint factory you can use to create an IEndpoint. From there, call Send() and it will send the message directly to that endpoint.

NServiceBus handle (receive) a Msmq message and send to a AzureStorageQueue using CastleWindsor

castle-windsor,msmq,nservicebus,azure-storage-queues

NServicebus does not support multiple transports at the moment, so an endpoint receiving from msmq also has to send to msmq. However it is possible to create a bridge from one transport type to the other if you play around with the internal structure a bit. I did this for...

Subscriber not reading event messages

c#,msmq,nservicebus,publish-subscribe

Apparently, if the user account the service is running under doesn't have permission to access its own queues, that's not worth emitting anything into the logs. We have given the account permission to read from the queues and now it's operating correctly....

What does 'Pool of native msmq messages is full' trace message mean?

wcf,c#-4.0,msmq,svctraceviewer

I think that message is nothing to worry about. I took a look at WCF source code, and found it's just diagnostic message when some internal object pool is full. They use pool in order to reuse MsmqInputMessage objects. And when pool is full, they just leave that object to...

Accessing RichTextBox in Multi-threaded application causes OutOfMemoryException

c#,multithreading,winforms,msmq

Try using BeginInvoke and AppendText, like so: public static void SetText(this RichTextBox textBox, string msg) { Action append = () => textBox.AppendText(msg); if (textBox.InvokeRequired) textBox.BeginInvoke(append); else append(); } ...

MSMQ + WCF - Retry with Growing Delay

wcf,message-queue,msmq,netmsmqbinding

It turns out there is no built-in way of doing this. One slightly involved option is to create multiple queues, each with its own retry/poison sub-queues, each with a growing retry delay. You can reuse the same handler for each queue - the only thing that changes is the configuration....

Multiple messages removed from MSMQ

c#,wcf,msmq,msmq-wcf

What you're seeing seems just expected to me. It is true that WCF can read multiple messages of the queue for processing. Normally, this isn't a problem, and with transactional queues, this would definitely not be an issue (because each individual transaction would only commit after the message processing is...

IIS app pool access network MSMQ c#

c#,asp.net,iis-7,msmq

This sounds like The Double-Hop Problem and prohibits forwarding of client details from your server to another machine. The issue does not occur when you have IIS and MSMQ on the same machine since there's only one hop (user to server). There's a lot more technical details published on this...

Write in MSMQ file an XML encoded in UTF8 With Bom

xml,vb.net,utf-8,msmq

The problem is that the StreamWriter has buffered data which is not being flushed: … writer.Write(obj.ToString()) writer.Flush(); message.BodyStream = stm ...

How do I send/receive multicast messages using MSMQ?

c#,.net,vb.net,msmq

So I figured it out. To send a multicast message: MessageQueue topic = new MessageQueue("formatname:multicast=234.1.1.1:8081") topic.Send("Hello out there") To receive a multicast message: It is a little tricky because you can't subscribe to the multicast address. What you need to do is create a queue, probably best to create a...

MSMQ Event Logging doesn't show dropped messages?

c#,windows,msmq

You can use MSMQ dead letter queues for that. message.UseDeadLetterQueue = true; With that enabled, if message can't be delivered it will be sent to one of two system dead letter queues - one for transactional and one for non transactional messages. You'll also find there the reason why message...

Alternative to MSMQ for use in Windows Store Applications

c#,windows-store-apps,msmq,netmsmqbinding,msmq-wcf

Okay after I concluded that there is no way to use MSMQ in Win Store Apps I found a great article that discusses a way to implement a OCA(Occasionally Connected Application) which is perfect for what I want to use- EDIT: Start with Using SQLite in Windows 8 Store Apps...

WCF filestream queue

c#,wcf,file-io,msmq

Your web service shouild save the uploaded image to a directory on your server and then return a JobID to the webpage. The web service method could also then post a message using System.Messaging with that JobID (and all relevant file info, etc) to an MSMQ queue. You can then...

Purge all MSMQ Private Queue Journals

c#,msmq

Found this link and used the PurgeQueues. MSMQ : How to purge system queue journal programaticaly? I kept the same code I was using to get the Queues, just added this code to do the clearing....

Getting Body content from MSMQ

c#,msmq

It was a Coding Issue. The result LOOKED like random rubbish, but just was a unicode characterset. The following solved the problem: message.Formatter = new BinaryMessageFormatter(); var reader = new StreamReader(message.BodyStream, Encoding.Unicode); var msgBody = reader.ReadToEnd(); ...

Example using MSMQ and Delphi or Builder C++?

delphi,msmq,c++builder

Check these links which should provide some more information on this matter: Steps to install Microsoft Message Queuing (MSMQ) ActiveX? Call Delphi method from another Delphi program...