Unconventional ways to send messages to MSMQ.

40 views
Skip to first unread message

Chris Slocum

unread,
Mar 24, 2015, 4:28:36 PM3/24/15
to masstrans...@googlegroups.com
I am still a bit new to using MassTransit but I have been researching this topic for a few weeks now and have not come close to finding an answer so I thought maybe I would ask the experts.  The task I am trying to accomplish is to be able to use the command line or a command line utility (MSMQ Management Console) to send a message to a MSMQ queue.  I then have a consumer of that queue written in C# which is utilizing MassTransit to read and process the message.  If I publish a message from the C# program, the message can be easily consumed by my MSMQ.  However, I have noticed upon careful inspection that the message is published with a message body and a message extension.  When I try to publish (send) the same message from the MSMQ Management Console, it cant be processed because its missing the extension.  So my question is... Is there a way to publish a message which is consumable by a MassTransit consumer which does not require the extension?  Below is a sample of my message body and further below, the message extension.  Any help on the topic would be greatly appreciated.

Thanks,
Chris


<?xml version="1.0" encoding="utf-8"?>
<envelope>
 <destinationAddress>msmq://XXXXXX/Nova_consumerService?tx=false&amp;recoverable=true</destinationAddress>
 <headers />
 <message>
  <tstMessage>ThisMsgFromWinForms</tstMessage>
 </message>
 <messageType>urn:message:Nova.Message:TestMessage</messageType>
 <sourceAddress>msmq://XXXXXX/Nova_issuemessage?tx=false&amp;recoverable=true</sourceAddress>
</envelope>


Message Extension

{"Content-Type":"application/vnd.masstransit+xml"}

Dru Sellers

unread,
Mar 24, 2015, 4:34:59 PM3/24/15
to masstrans...@googlegroups.com
You could write a simple C# program to 'send' the messages into the application. 

-d

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/f6e41a47-970a-4a7f-88a9-6aa12f6cbc79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Slocum

unread,
Mar 24, 2015, 8:54:19 PM3/24/15
to masstrans...@googlegroups.com
Hi Dru! Thanks so much for your reply. I would love to write the send function in C# but the business group won't allow any new programs deployed on the app servers so its either command line or bust :(

Thanks,
Chris

Chris Patterson

unread,
Mar 24, 2015, 9:01:42 PM3/24/15
to masstrans...@googlegroups.com
Use Json as your default message serializer and it might work without the extension.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages