SlideShare uma empresa Scribd logo
1 de 23
Baixar para ler offline
© Peter R. Egli 2015
1/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
Peter R. Egli
INDIGOO.COM
MSMQ
MICROSOFT MESSAGE QUEUING
AN INTRODUCTION TO MSMQ, MICROSOFTS
MESSAGE QUEUING TECHNOLOGY
© Peter R. Egli 2015
2/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
Contents
1. What is MSMQ?
2. Main features of MSMQ
3. MSMQ modes
4. MSMQ queue types
5. Structure of an MSMQ message
6. Triggers
7. MSMQ queue path syntax
8. MSMQ programming guidelines
9. Programmatic access to MSMQ
10. Creating queues
11. Sending messages to multiple destinations
12. Reliable messaging
13. Queue management
14. MSMQ and WCF
© Peter R. Egli 2015
3/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
1. What is MSMQ?
MSMQ is Microsofts message queue system.
MSMQ is a MOM (Message Oriented Middleware) technology for distributed applications.
The messaging allows temporal decoupling of the participants.
Sender
Sender
Sender
Message Queue
(MSMQ instance)
Receiver 1
Receiver 2
MQIS
MQIS (Message Queue Information Store):
Distributed DB with enterprise topology,
computer and public queue information
(required when using public queues).
Msg1
Msg2
Msg3
Msg1Msg3
Msg1
Msg2
Msg2
© Peter R. Egli 2015
4/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
2. Main features of MSMQ
Guaranteed message delivery:
MSMQ guarantees delivery of a message even when the receiver of the message is temporarily
down.
Message routing:
MSMQ takes care of routing messages to the addressed destination.
Security:
Optionally, MSMQ messaging supports authentication and encryption of messages.
Priority-based messaging:
MSMQ allows giving messages priorities to expedite the delivery of higher priority messages
over lower priority messages.
Different message transport protocols:
MSMQ can be configured to use either TCP or UDP transport protocols directly or use
RPC (Remote Procedure Call) as transport protocol.
Transactions:
MSMQ allows packing multiple messages into a transaction. Either all messages pertaining to
the transaction are delivered to the destination or none.
© Peter R. Egli 2015
5/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
3. MSMQ modes
MSMQ can be run in the 2 modes ‘workgroup’ and ‘domain’.
Workgroup mode:
MSMQ only supports private queues in
workgroup mode.
Installation components for workgroup mode:
Common (MSMQ base functionality).
Domain mode:
MSMQ in domain mode allows sending messages
between multiple domains (multiple message
hops).
In domain mode, MSMQ supports both
private and public queues.
Installation components for domain mode:
Active Directory Integration, Common, Triggers.
© Peter R. Egli 2015
6/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
4. MSMQ queue types (1/3)
MSMQ defines user message queues and system message queues. User message queues
are either private or public queues.
1. Private queues:
Arbitrary applications can read and write to a specific private message queue.
MSMQ does not support message routing with private queues.
The MSMQ service (the message queue actually) needs to be installed on one machine.
Different applications may send to or receive from that MSMQ instance.
Typical applications for private queues:
Client and server are relatively close and there is a reliable connection between client and
server (e.g. both client and server are hosted on the same machine).
Application
(e.g. order
creation)
Application
(e.g. order
processing)
© Peter R. Egli 2015
7/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
4. MSMQ queue types (2/3)
2. Public queues:
Public queues allow for multi-hop scenarios where messages are replicated through the
Active Directory service.
Public queues are published in and hosted by MQIS (MSMQ Information Store = distributed
database for MSMQ).
Typical applications: Coupling 2 applications over an unreliable network such as the Internet.
Application
(e.g. order
creation)
Application
(e.g. order
processing)
Internet
© Peter R. Egli 2015
8/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
4. MSMQ queue types (3/3)
3. System queues:
System queues are used for management purposes.
a. Journal message queue:
Journal message queues store copies of messages sent to, through or from a host if the
property UseJournalQueue is set to true on the message but to false on the receiving queue.
This allows getting a message copy in the receiving queue or globally get copies of all
messages of all queues in the journal message system queue.
Usage of journal messages: Logging / backup of messages.
N.B.: Regularly purge journal message queues (otherwise they will grow beyond all bounds).
b. Dead-letter message queues:
Dead-letter message queues store undeliverable messages or messages that expire before they
are received (final resting place for undeliverable messages).
c. Transactional dead-letter message queues:
Transactional dead-letter queues behave as dead-letter messages, but are used for
transactional messages.
© Peter R. Egli 2015
9/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
5. Structure of an MSMQ message
A message contains a range of properties that are carried from the sending MSMQ system to
the receiving message queue.
Header
Body
Label
The header carries various properties:
- Message priority
- Message lifetime (how long is message valid)
- Use dead-letter queue flag
- Acknowledge type
...
- UseTracing flag
The body contains the formatted user message
(XML, binary or ActiveX format).
The label carries additional application specific
information (carried transparently from the sending
application to receiving application).
E.g. the label could be used to carry an
application-specific priority (urgent processing, normal).
© Peter R. Egli 2015
10/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
6. Triggers
MSMQ triggers allow an application to receive notifications in the application when the
message queue received a message.
In general, triggers should be chosen over queue polling (asynchronous reading of messages
from the message queue).
.Net allows using an AsyncCallback method instead of the MSMQ triggers as exemplified
below:
private void receiveOnQueue(IAsyncResult asyncResult)
{
System.Messaging.Message msg = this.rxMsgQueue.EndReceive(asyncResult);
//re-arm the callback delegate
this.rxMsgQueue.BeginReceive(System.TimeSpan.FromMinutes(60), null, new
AsyncCallback(this.receiveOnQueue));
}
...
rxMsgQueue.BeginReceive(System.TimeSpan.FromMinutes(60), null, new
AsyncCallback(this.receiveOnQueue));
...
© Peter R. Egli 2015
11/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
7. MSMQ queue path syntax (1/3)
MSMQ queues are addressed with a queue path. There are 2 general path syntaxes:
1. FormatName syntax (1/2):
A FormatName uniquely identifies an MSMQ queue using connection details and the queue’s
path.
No additional name resolving is necessary (Windows directory service is not contacted for
resolving the queue name).
Example public queue: "FormatName:DIRECT=OS:MyMachineMyQueue"
Example private queue: "FormatName:DIRECT=OS:MyMachinePrivate$MyQueue"
When to use FormatName syntax:
a. Send message directly to a computer
b. Send messages over the Internet
c. Send / receive messages to any queue while operating in domain, workgroup,
or offline mode
d. Message routing, authentication and encryption not needed (these require the
domain controller)
 In general, when working without domain controller, use the FormatName syntax.
© Peter R. Egli 2015
12/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
7. MSMQ queue path syntax (2/3)
1. FormatName syntax (2/2)
FormatName syntax is different for public queues and private queues.
Public queue:
FormatName:DIRECT=<protocol>:<dest. IP address or hostname *><queue name>
Private queue:
FormatName:DIRECT=<protocol>:<dest. IP address or hostname *>Private$<queue name>
* If the message sender and receiver are co-located on the same machine, the destination
address can be substituted by a dot (.).
Protocol: TCP, SPX, OS (native computer naming), HTTP, HTTPS.
2. Path name syntax:
Path name syntax is a shorthand notation for identifying a queue.
When using the queue path, the Windows domain controller (LDAP DB, CIFS server) translates
the path name into the associated FormatName before accessing the queue.
Thus the path name syntax requires a windows domain and domain controller.
Example: "MyMachinePrivate$MyQueue"
© Peter R. Egli 2015
13/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
7. MSMQ queue path syntax (3/3)
Queue paths for the different queue types:
Queue type Path syntax
Public queue <Computername><queue name>
.<queue name> (dot shorthand only when sender and receiver are on the same machine)
FormatName:Public=<queue GUID> (1)
Private queue <Computername>Private$QueueName
.Private$<queue name> (dot shorthand only when sender and receiver are on the same machine)
FormatName:DIRECT=SPX:<network number>:<host number><queue name> (1)
FormatName:DIRECT=TCP:<IP address><queue name> (1)
FormatName:DIRECT=OS:<computer name><queue name> (1)
FormatName:DL=<distribution list GUID> (2)
FormatName:DIRECT=http://<client name>/msmq/<queue name> (1)
Journal queue <Computername><queue name>Journal$
Computer journal queue <Computername>Journal$
Computer dead-letter queue <Computername>Deadletter$
Computer transaction dead-
letter queue
<Computername>XactDeadletter$
(1) FormatName syntax.
(2) FormatName syntax for sending messages to a distribution list.
© Peter R. Egli 2015
14/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
8. MSMQ programming guidelines (1/2)
Message queueing, as every other form of distributed computing, needs careful consideration
as regards performance. The following guidelines should be followed when programming an
MSMQ application.
Do only local receives:
Receiving from remote queues on other machines is costly (network delay, protocol overhead).
Read operations from queues should be done from an application running on the same host as
the message queue.
Avoid accesses to MQIS (Microsoft Queue Information Store):
MQIS accesses are costly. Therefore, operations such as dynamic lookups of queue references
should be avoided where possible.
One way to achieve this is using hardcoded queue references. The drawbacks of this approach
(reduced flexibility) has to be weighed against performance gains.
Decouple message receiver from application:
The message receiving part of an application should be decoupled from the rest of the
application so that it does not block and can react to other events in case there are no
messages to be received.
This can be achieved with a receiver thread or by using receive operation timeouts.
© Peter R. Egli 2015
15/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
8. MSMQ programming guidelines (2/2)
Prudent use of transactions:
Transactions, like other special message queueing features, are costly (slower than normal
message passing).
Therefore, use transactions only where necessary.
Static queue creation:
Queue creation is costly, too. Message queues should be created administratively before
starting the application and not dynamically at run time.
Careful use of acknowledgments:
Use message acknowledgments only where the application requires confirmation of successful
delivery of messages.
In most cases, acknowledgments can be omitted and message delivery failures handled in the
application itself.
© Peter R. Egli 2015
16/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
9. Programmatic access to MSMQ
MSMQ can be accessed programmatically through native Win32 and COM APIs.
.Net provides access to the MSMQ system through the System.Messaging namespace
allowing to:
A. Connect to queues, send / receive messages
B. Monitor queues
C. Administer queues
Important classes of System.Messaging:
System.Messaging.Message The message class.
System.Messaging.MessageQueue The message queue.
System.Messaging.XmlMessageFormatter Encapsulates the message body in XML
format.
System.Messaging.BinaryMessageFormatter Encapsulates the message body in binary
format.
System.Messageing.ActiveXFormatter Encapsulates the message body in
ActiveX compatible format.
© Peter R. Egli 2015
17/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
10. Creating queues
Queues can be created either administratively or programmatically.
1. Create queues administratively:
Control Panel  Administrative Tools  Computer Management.
2. Create queues programmatically:
MessageQueue mq = MessageQueue.Create(<queue path>);
© Peter R. Egli 2015
18/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
11. Sending messages to multiple destinations
There are different ways with MSMQ to send a message to multiple destinations.
1. Distribution list:
Distribution lists are special format names that are stored in the Active Directory Domain
Service (using distribution lists requires a running AD).
Format name: DL=<dist. list identifier>
The format name is resolved using the AD.
Using distribution lists allows hiding the location of the receiver queue to the sending and
receiving applications (transparency).
2. Multicast address:
When using multicast IP addresses, the distribution to multiple receivers is performed by the
network and not MSMQ.
Format name: MULTICAST=<Address>:<Port>
Multicast addresses are in the IP range 224.0.0.0 through 239.255.255.255.
3. Multiple-element format name:
Multiple destinations can be specified in the format name with a list.
Multiple-element format name = list of comma-separated format names.
<format name 1>,<format name 2>,<format name 3>...<format name n>
© Peter R. Egli 2015
19/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
12. Reliable messaging (1/3)
MSMQ stores messages in volatile memory (RAM) in order to increase performance.
In case of a crash it is possible that messages are lost.
There are different ways to make the message transmission reliable.
1. MSMQ transactions:
Message transactions allows sending a sequence of messages that are either received in their
entirety or no message at all (“all or nothing”).
N.B.: The transaction support of MSMQ is limited to messaging itself. It is not possible to
include, for example, database accesses in the transaction (but MSMQ can participate in MS
DTC transactions).
Example:
//transactional send
MessageQueueTransaction msgTrans = new MessageQueueTransaction();
msgTrans.Begin();
msgQ.send("Hello World", msgTrans); msgQ.send("Goodbye World", msgTrans);
msgTrans.Commit(); //now the messages are sent
//transactional receive
msgTrans.Begin();
Message msg;
msg = msgQ.Receive(msgTrans);
msgTrans.Commit();
DTC: Distributed Transaction Coordinator
© Peter R. Egli 2015
20/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
12. Reliable messaging (2/3)
2. Acknowledgment types (1/2):
MSMQ provides a range of different acknowledgment types for reliable messaging.
Acknowledgments are special MSMQ messages sent back to the sending MSMQ system to
inform about positive (message successfully received) or negative (message timed out, i.e. not
received from the queue by an application) reception of a message.
Typical sequence for message sender:
MessageQueue msgQ = new MessageQueue(@".private$Orders");
msgQ.DefaultPropertiesToSend.AcknowledgeType = AcknowledgeTypes.FullReachQueue |
AcknoledgeTypes.FullReceive;
msgQ.DefaultPropertiesToSend.AdministrationQueue = new MessageQueue(@".private$Ack");
msgQ.Send("Sample");
//Receive ack message
Message msg;
msg = msgQ.Receive(new TimeSpan(0), MessageQueueTransactionType.Single);
//Receive Acknowldgement Messages
MessageQueue adminQ = new MessageQueue(@".private$Ack");
adminQ.MessageReadPropertyFilter.CorrelationId = True;
msg = adminQ.Receive(new TimeSpan(0,0,5));
if (msg.MessageType = MessageType.Acknowledgment) {
switch(msg.Acknowledgment) {
case Acknowledgment.ReachQueue:
break;
case Acknowledgment.Receive:
break;
...
© Peter R. Egli 2015
21/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
12. Reliable messaging (3/3)
2. Acknowledgment types (2/2):
There are different acknowledgment types available. The Message.AcknowledgeType property
is a bit mask, so different acknowledgment types can be combined.
3. Property Message.Recoverable:
If the property Message.Recoverable is set to true, MSMQ stores the message to hard disk so
that in case of a crash the message may be recovered after a reboot.
Acknowledgment type Description
AcknowledgmentTypes.FullReachQueue Success and failure indication to be delivered to the queue.
AcknowledgmentTypes.FullReceive Success and failure indication to be received from the queue by the
application.
AcknowledgmentTypes.NegativeReceive Negative acknowledgment to be sent when the application fails to receive
the message from the queue (explicit negative acknowledgment).
AcknowledgmentTypes.NotAcknowledgeReachQueue A mask used to request a negative acknowledgment when the original
message cannot reach the queue. This can happen when the time-to-reach-
queue timer expires or when a message cannot be authenticated.
AcknowledgmentTypes.NotAcknowledgeReceive A mask used to request a negative acknowledgment when an error occurs
that prevents the original message from being received from the queue
before its time-to-be-received timer expires.
AcknowledgmentTypes.PositiveArrival Successful delivery to the queue.
AcknowledgmentTypes.PositiveReceive Successful receive from the queue by the application.
AcknowledgmentTypes.None Request for no acknowledgment at all (neither positive nor negative).
© Peter R. Egli 2015
22/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
13. Queue management
A minimal tool for administering MSMQ can be found under Control Panel  Administrative
Tools  Computer Management.
Undelivered messages
Public queues (created administratively or programmatically)
Private queues with:
a. Queue messages (successfully delivered to queue, but not retrieved by
an application)
b. Journal message (copies of messages in „Queue messages“ if the
property UseJournalQueue is set to true on the queue)
c. Triggers (contains triggers that fire when a message is placed in this
queue)
Global journal message queue
MSMQ places a copy of every undeliverable message or message that expires
before it is received into this queue.
Same as the dead-letter queue, but for all transactional messages.
© Peter R. Egli 2015
23/23
Rev. 1.80
MSMQ – Microsoft Message Queuing indigoo.com
14. MSMQ and WCF
WCF (Windows Communication Foundation) is a unified communication framework for
distributed applications.
WCF defines a common programming model and unified API for clients and services to send
messages between each other.
WCF is very flexible and allows using different transport protocols for delivering messages.
MSMQ is one of the transport mechanisms supported by WCF.
The transport protocol is selected through a binding (the ‘B’ in ‘ABC’).
WCF supports 2 bindings based on MSMQ:
A. NetMsmqBinding:
NetMsmqBinding is suitable when .Net WCF is used on both sides of the communication
(sender and receiver).
B. MsmqIntegrationBinding:
MsmqIntegrationBinding may be used to connect a .Net WCF application to an existing native
MSMQ application already in place.

Mais conteúdo relacionado

Mais procurados

Next Generation Nexus 9000 Architecture
Next Generation Nexus 9000 ArchitectureNext Generation Nexus 9000 Architecture
Next Generation Nexus 9000 ArchitectureCisco Canada
 
IBM MQ - better application performance
IBM MQ - better application performanceIBM MQ - better application performance
IBM MQ - better application performanceMarkTaylorIBM
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in EnglishEric Xiao
 
Introducción a los sistemas distribuidos
Introducción a los sistemas distribuidosIntroducción a los sistemas distribuidos
Introducción a los sistemas distribuidosRene Guaman-Quinche
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureAlvaro Videla
 
Secure Shell(ssh)
Secure Shell(ssh)Secure Shell(ssh)
Secure Shell(ssh)Pina Parmar
 
CCNA 2 Routing and Switching v5.0 Chapter 1
CCNA 2 Routing and Switching v5.0 Chapter 1CCNA 2 Routing and Switching v5.0 Chapter 1
CCNA 2 Routing and Switching v5.0 Chapter 1Nil Menon
 
Avaya VoIP on Cisco Best Practices by PacketBase
Avaya VoIP on Cisco Best Practices by PacketBaseAvaya VoIP on Cisco Best Practices by PacketBase
Avaya VoIP on Cisco Best Practices by PacketBasePacketBase, Inc.
 
Object and component based middleware for distributed system development
Object and component based middleware for distributed system developmentObject and component based middleware for distributed system development
Object and component based middleware for distributed system developmentektabhalwara
 
VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network) Netwax Lab
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to MicroservicesMahmoudZidan41
 
Cisco router-commands
Cisco router-commandsCisco router-commands
Cisco router-commandsRobin Rohit
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentationAzhar Khuwaja
 
Introducing Cloudflare Workers
Introducing Cloudflare WorkersIntroducing Cloudflare Workers
Introducing Cloudflare WorkersMeghan Weinreich
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQWoo Young Choi
 

Mais procurados (20)

Next Generation Nexus 9000 Architecture
Next Generation Nexus 9000 ArchitectureNext Generation Nexus 9000 Architecture
Next Generation Nexus 9000 Architecture
 
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
Introduction to CloudStack: How to Deploy and Manage Infrastructure-as-a-Serv...
 
IBM MQ - better application performance
IBM MQ - better application performanceIBM MQ - better application performance
IBM MQ - better application performance
 
Basics of ssl
Basics of sslBasics of ssl
Basics of ssl
 
Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in English
 
Protocole ARP/RARP
Protocole ARP/RARPProtocole ARP/RARP
Protocole ARP/RARP
 
Introducción a los sistemas distribuidos
Introducción a los sistemas distribuidosIntroducción a los sistemas distribuidos
Introducción a los sistemas distribuidos
 
CCNA
CCNACCNA
CCNA
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal Architecture
 
Secure Shell(ssh)
Secure Shell(ssh)Secure Shell(ssh)
Secure Shell(ssh)
 
CCNA 2 Routing and Switching v5.0 Chapter 1
CCNA 2 Routing and Switching v5.0 Chapter 1CCNA 2 Routing and Switching v5.0 Chapter 1
CCNA 2 Routing and Switching v5.0 Chapter 1
 
Avaya VoIP on Cisco Best Practices by PacketBase
Avaya VoIP on Cisco Best Practices by PacketBaseAvaya VoIP on Cisco Best Practices by PacketBase
Avaya VoIP on Cisco Best Practices by PacketBase
 
Object and component based middleware for distributed system development
Object and component based middleware for distributed system developmentObject and component based middleware for distributed system development
Object and component based middleware for distributed system development
 
VPN (virtual private network)
VPN (virtual private network) VPN (virtual private network)
VPN (virtual private network)
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Cisco router-commands
Cisco router-commandsCisco router-commands
Cisco router-commands
 
Vpn ppt
Vpn pptVpn ppt
Vpn ppt
 
SDN Fundamentals - short presentation
SDN Fundamentals -  short presentationSDN Fundamentals -  short presentation
SDN Fundamentals - short presentation
 
Introducing Cloudflare Workers
Introducing Cloudflare WorkersIntroducing Cloudflare Workers
Introducing Cloudflare Workers
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ
 

Semelhante a MSMQ - Microsoft Message Queueing

Websphere MQ admin guide
Websphere MQ admin guideWebsphere MQ admin guide
Websphere MQ admin guideRam Babu
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overviewGeshan Manandhar
 
Where is My Message
Where is My MessageWhere is My Message
Where is My MessageMatt Leming
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented MiddlewarePeter R. Egli
 
Usp message queues
Usp message queuesUsp message queues
Usp message queuesRohitK71
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)Senior Dev
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsJohn Staveley
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementationRajan Kumar
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKXMike Willbanks
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...VMware Tanzu
 
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...Matt Leming
 
2023comp90024_workshop.pdf
2023comp90024_workshop.pdf2023comp90024_workshop.pdf
2023comp90024_workshop.pdfLevLafayette1
 
øMQ Vortrag
øMQ VortragøMQ Vortrag
øMQ Vortragmirosso25
 

Semelhante a MSMQ - Microsoft Message Queueing (20)

Websphere MQ admin guide
Websphere MQ admin guideWebsphere MQ admin guide
Websphere MQ admin guide
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
WebSphere MQ introduction
WebSphere MQ introductionWebSphere MQ introduction
WebSphere MQ introduction
 
Message Queues a basic overview
Message Queues a basic overviewMessage Queues a basic overview
Message Queues a basic overview
 
Where is My Message
Where is My MessageWhere is My Message
Where is My Message
 
IBM MQ Series For ZOS
IBM MQ Series For ZOSIBM MQ Series For ZOS
IBM MQ Series For ZOS
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented Middleware
 
T3UC_PresentationT3UC2012_Rajesh
T3UC_PresentationT3UC2012_RajeshT3UC_PresentationT3UC2012_Rajesh
T3UC_PresentationT3UC2012_Rajesh
 
Usp message queues
Usp message queuesUsp message queues
Usp message queues
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)
 
Backtrack Manual Part6
Backtrack Manual Part6Backtrack Manual Part6
Backtrack Manual Part6
 
Ibm mq
Ibm mqIbm mq
Ibm mq
 
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
Winning the Lottery with Spring: A Microservices Case Study for the Dutch Lot...
 
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
 
2023comp90024_workshop.pdf
2023comp90024_workshop.pdf2023comp90024_workshop.pdf
2023comp90024_workshop.pdf
 
øMQ Vortrag
øMQ VortragøMQ Vortrag
øMQ Vortrag
 
MQPresentation.ppt
MQPresentation.pptMQPresentation.ppt
MQPresentation.ppt
 

Mais de Peter R. Egli

LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosLPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosPeter R. Egli
 
Data Networking Concepts
Data Networking ConceptsData Networking Concepts
Data Networking ConceptsPeter R. Egli
 
Communication middleware
Communication middlewareCommunication middleware
Communication middlewarePeter R. Egli
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Peter R. Egli
 
Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Peter R. Egli
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET PlatformPeter R. Egli
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud ComputingPeter R. Egli
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingPeter R. Egli
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration TechnologiesPeter R. Egli
 
Overview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyOverview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyPeter R. Egli
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development KitPeter R. Egli
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Peter R. Egli
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBAPeter R. Egli
 
Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Peter R. Egli
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging ServicePeter R. Egli
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State TransferPeter R. Egli
 

Mais de Peter R. Egli (20)

LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosLPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
 
Data Networking Concepts
Data Networking ConceptsData Networking Concepts
Data Networking Concepts
 
Communication middleware
Communication middlewareCommunication middleware
Communication middleware
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)
 
Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET Platform
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud Computing
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message Queueing
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration Technologies
 
Overview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyOverview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technology
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
Web services
Web servicesWeb services
Web services
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBA
 
Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging Service
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 

Último

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

MSMQ - Microsoft Message Queueing

  • 1. © Peter R. Egli 2015 1/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com Peter R. Egli INDIGOO.COM MSMQ MICROSOFT MESSAGE QUEUING AN INTRODUCTION TO MSMQ, MICROSOFTS MESSAGE QUEUING TECHNOLOGY
  • 2. © Peter R. Egli 2015 2/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com Contents 1. What is MSMQ? 2. Main features of MSMQ 3. MSMQ modes 4. MSMQ queue types 5. Structure of an MSMQ message 6. Triggers 7. MSMQ queue path syntax 8. MSMQ programming guidelines 9. Programmatic access to MSMQ 10. Creating queues 11. Sending messages to multiple destinations 12. Reliable messaging 13. Queue management 14. MSMQ and WCF
  • 3. © Peter R. Egli 2015 3/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 1. What is MSMQ? MSMQ is Microsofts message queue system. MSMQ is a MOM (Message Oriented Middleware) technology for distributed applications. The messaging allows temporal decoupling of the participants. Sender Sender Sender Message Queue (MSMQ instance) Receiver 1 Receiver 2 MQIS MQIS (Message Queue Information Store): Distributed DB with enterprise topology, computer and public queue information (required when using public queues). Msg1 Msg2 Msg3 Msg1Msg3 Msg1 Msg2 Msg2
  • 4. © Peter R. Egli 2015 4/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 2. Main features of MSMQ Guaranteed message delivery: MSMQ guarantees delivery of a message even when the receiver of the message is temporarily down. Message routing: MSMQ takes care of routing messages to the addressed destination. Security: Optionally, MSMQ messaging supports authentication and encryption of messages. Priority-based messaging: MSMQ allows giving messages priorities to expedite the delivery of higher priority messages over lower priority messages. Different message transport protocols: MSMQ can be configured to use either TCP or UDP transport protocols directly or use RPC (Remote Procedure Call) as transport protocol. Transactions: MSMQ allows packing multiple messages into a transaction. Either all messages pertaining to the transaction are delivered to the destination or none.
  • 5. © Peter R. Egli 2015 5/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 3. MSMQ modes MSMQ can be run in the 2 modes ‘workgroup’ and ‘domain’. Workgroup mode: MSMQ only supports private queues in workgroup mode. Installation components for workgroup mode: Common (MSMQ base functionality). Domain mode: MSMQ in domain mode allows sending messages between multiple domains (multiple message hops). In domain mode, MSMQ supports both private and public queues. Installation components for domain mode: Active Directory Integration, Common, Triggers.
  • 6. © Peter R. Egli 2015 6/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 4. MSMQ queue types (1/3) MSMQ defines user message queues and system message queues. User message queues are either private or public queues. 1. Private queues: Arbitrary applications can read and write to a specific private message queue. MSMQ does not support message routing with private queues. The MSMQ service (the message queue actually) needs to be installed on one machine. Different applications may send to or receive from that MSMQ instance. Typical applications for private queues: Client and server are relatively close and there is a reliable connection between client and server (e.g. both client and server are hosted on the same machine). Application (e.g. order creation) Application (e.g. order processing)
  • 7. © Peter R. Egli 2015 7/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 4. MSMQ queue types (2/3) 2. Public queues: Public queues allow for multi-hop scenarios where messages are replicated through the Active Directory service. Public queues are published in and hosted by MQIS (MSMQ Information Store = distributed database for MSMQ). Typical applications: Coupling 2 applications over an unreliable network such as the Internet. Application (e.g. order creation) Application (e.g. order processing) Internet
  • 8. © Peter R. Egli 2015 8/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 4. MSMQ queue types (3/3) 3. System queues: System queues are used for management purposes. a. Journal message queue: Journal message queues store copies of messages sent to, through or from a host if the property UseJournalQueue is set to true on the message but to false on the receiving queue. This allows getting a message copy in the receiving queue or globally get copies of all messages of all queues in the journal message system queue. Usage of journal messages: Logging / backup of messages. N.B.: Regularly purge journal message queues (otherwise they will grow beyond all bounds). b. Dead-letter message queues: Dead-letter message queues store undeliverable messages or messages that expire before they are received (final resting place for undeliverable messages). c. Transactional dead-letter message queues: Transactional dead-letter queues behave as dead-letter messages, but are used for transactional messages.
  • 9. © Peter R. Egli 2015 9/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 5. Structure of an MSMQ message A message contains a range of properties that are carried from the sending MSMQ system to the receiving message queue. Header Body Label The header carries various properties: - Message priority - Message lifetime (how long is message valid) - Use dead-letter queue flag - Acknowledge type ... - UseTracing flag The body contains the formatted user message (XML, binary or ActiveX format). The label carries additional application specific information (carried transparently from the sending application to receiving application). E.g. the label could be used to carry an application-specific priority (urgent processing, normal).
  • 10. © Peter R. Egli 2015 10/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 6. Triggers MSMQ triggers allow an application to receive notifications in the application when the message queue received a message. In general, triggers should be chosen over queue polling (asynchronous reading of messages from the message queue). .Net allows using an AsyncCallback method instead of the MSMQ triggers as exemplified below: private void receiveOnQueue(IAsyncResult asyncResult) { System.Messaging.Message msg = this.rxMsgQueue.EndReceive(asyncResult); //re-arm the callback delegate this.rxMsgQueue.BeginReceive(System.TimeSpan.FromMinutes(60), null, new AsyncCallback(this.receiveOnQueue)); } ... rxMsgQueue.BeginReceive(System.TimeSpan.FromMinutes(60), null, new AsyncCallback(this.receiveOnQueue)); ...
  • 11. © Peter R. Egli 2015 11/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 7. MSMQ queue path syntax (1/3) MSMQ queues are addressed with a queue path. There are 2 general path syntaxes: 1. FormatName syntax (1/2): A FormatName uniquely identifies an MSMQ queue using connection details and the queue’s path. No additional name resolving is necessary (Windows directory service is not contacted for resolving the queue name). Example public queue: "FormatName:DIRECT=OS:MyMachineMyQueue" Example private queue: "FormatName:DIRECT=OS:MyMachinePrivate$MyQueue" When to use FormatName syntax: a. Send message directly to a computer b. Send messages over the Internet c. Send / receive messages to any queue while operating in domain, workgroup, or offline mode d. Message routing, authentication and encryption not needed (these require the domain controller)  In general, when working without domain controller, use the FormatName syntax.
  • 12. © Peter R. Egli 2015 12/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 7. MSMQ queue path syntax (2/3) 1. FormatName syntax (2/2) FormatName syntax is different for public queues and private queues. Public queue: FormatName:DIRECT=<protocol>:<dest. IP address or hostname *><queue name> Private queue: FormatName:DIRECT=<protocol>:<dest. IP address or hostname *>Private$<queue name> * If the message sender and receiver are co-located on the same machine, the destination address can be substituted by a dot (.). Protocol: TCP, SPX, OS (native computer naming), HTTP, HTTPS. 2. Path name syntax: Path name syntax is a shorthand notation for identifying a queue. When using the queue path, the Windows domain controller (LDAP DB, CIFS server) translates the path name into the associated FormatName before accessing the queue. Thus the path name syntax requires a windows domain and domain controller. Example: "MyMachinePrivate$MyQueue"
  • 13. © Peter R. Egli 2015 13/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 7. MSMQ queue path syntax (3/3) Queue paths for the different queue types: Queue type Path syntax Public queue <Computername><queue name> .<queue name> (dot shorthand only when sender and receiver are on the same machine) FormatName:Public=<queue GUID> (1) Private queue <Computername>Private$QueueName .Private$<queue name> (dot shorthand only when sender and receiver are on the same machine) FormatName:DIRECT=SPX:<network number>:<host number><queue name> (1) FormatName:DIRECT=TCP:<IP address><queue name> (1) FormatName:DIRECT=OS:<computer name><queue name> (1) FormatName:DL=<distribution list GUID> (2) FormatName:DIRECT=http://<client name>/msmq/<queue name> (1) Journal queue <Computername><queue name>Journal$ Computer journal queue <Computername>Journal$ Computer dead-letter queue <Computername>Deadletter$ Computer transaction dead- letter queue <Computername>XactDeadletter$ (1) FormatName syntax. (2) FormatName syntax for sending messages to a distribution list.
  • 14. © Peter R. Egli 2015 14/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 8. MSMQ programming guidelines (1/2) Message queueing, as every other form of distributed computing, needs careful consideration as regards performance. The following guidelines should be followed when programming an MSMQ application. Do only local receives: Receiving from remote queues on other machines is costly (network delay, protocol overhead). Read operations from queues should be done from an application running on the same host as the message queue. Avoid accesses to MQIS (Microsoft Queue Information Store): MQIS accesses are costly. Therefore, operations such as dynamic lookups of queue references should be avoided where possible. One way to achieve this is using hardcoded queue references. The drawbacks of this approach (reduced flexibility) has to be weighed against performance gains. Decouple message receiver from application: The message receiving part of an application should be decoupled from the rest of the application so that it does not block and can react to other events in case there are no messages to be received. This can be achieved with a receiver thread or by using receive operation timeouts.
  • 15. © Peter R. Egli 2015 15/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 8. MSMQ programming guidelines (2/2) Prudent use of transactions: Transactions, like other special message queueing features, are costly (slower than normal message passing). Therefore, use transactions only where necessary. Static queue creation: Queue creation is costly, too. Message queues should be created administratively before starting the application and not dynamically at run time. Careful use of acknowledgments: Use message acknowledgments only where the application requires confirmation of successful delivery of messages. In most cases, acknowledgments can be omitted and message delivery failures handled in the application itself.
  • 16. © Peter R. Egli 2015 16/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 9. Programmatic access to MSMQ MSMQ can be accessed programmatically through native Win32 and COM APIs. .Net provides access to the MSMQ system through the System.Messaging namespace allowing to: A. Connect to queues, send / receive messages B. Monitor queues C. Administer queues Important classes of System.Messaging: System.Messaging.Message The message class. System.Messaging.MessageQueue The message queue. System.Messaging.XmlMessageFormatter Encapsulates the message body in XML format. System.Messaging.BinaryMessageFormatter Encapsulates the message body in binary format. System.Messageing.ActiveXFormatter Encapsulates the message body in ActiveX compatible format.
  • 17. © Peter R. Egli 2015 17/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 10. Creating queues Queues can be created either administratively or programmatically. 1. Create queues administratively: Control Panel  Administrative Tools  Computer Management. 2. Create queues programmatically: MessageQueue mq = MessageQueue.Create(<queue path>);
  • 18. © Peter R. Egli 2015 18/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 11. Sending messages to multiple destinations There are different ways with MSMQ to send a message to multiple destinations. 1. Distribution list: Distribution lists are special format names that are stored in the Active Directory Domain Service (using distribution lists requires a running AD). Format name: DL=<dist. list identifier> The format name is resolved using the AD. Using distribution lists allows hiding the location of the receiver queue to the sending and receiving applications (transparency). 2. Multicast address: When using multicast IP addresses, the distribution to multiple receivers is performed by the network and not MSMQ. Format name: MULTICAST=<Address>:<Port> Multicast addresses are in the IP range 224.0.0.0 through 239.255.255.255. 3. Multiple-element format name: Multiple destinations can be specified in the format name with a list. Multiple-element format name = list of comma-separated format names. <format name 1>,<format name 2>,<format name 3>...<format name n>
  • 19. © Peter R. Egli 2015 19/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 12. Reliable messaging (1/3) MSMQ stores messages in volatile memory (RAM) in order to increase performance. In case of a crash it is possible that messages are lost. There are different ways to make the message transmission reliable. 1. MSMQ transactions: Message transactions allows sending a sequence of messages that are either received in their entirety or no message at all (“all or nothing”). N.B.: The transaction support of MSMQ is limited to messaging itself. It is not possible to include, for example, database accesses in the transaction (but MSMQ can participate in MS DTC transactions). Example: //transactional send MessageQueueTransaction msgTrans = new MessageQueueTransaction(); msgTrans.Begin(); msgQ.send("Hello World", msgTrans); msgQ.send("Goodbye World", msgTrans); msgTrans.Commit(); //now the messages are sent //transactional receive msgTrans.Begin(); Message msg; msg = msgQ.Receive(msgTrans); msgTrans.Commit(); DTC: Distributed Transaction Coordinator
  • 20. © Peter R. Egli 2015 20/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 12. Reliable messaging (2/3) 2. Acknowledgment types (1/2): MSMQ provides a range of different acknowledgment types for reliable messaging. Acknowledgments are special MSMQ messages sent back to the sending MSMQ system to inform about positive (message successfully received) or negative (message timed out, i.e. not received from the queue by an application) reception of a message. Typical sequence for message sender: MessageQueue msgQ = new MessageQueue(@".private$Orders"); msgQ.DefaultPropertiesToSend.AcknowledgeType = AcknowledgeTypes.FullReachQueue | AcknoledgeTypes.FullReceive; msgQ.DefaultPropertiesToSend.AdministrationQueue = new MessageQueue(@".private$Ack"); msgQ.Send("Sample"); //Receive ack message Message msg; msg = msgQ.Receive(new TimeSpan(0), MessageQueueTransactionType.Single); //Receive Acknowldgement Messages MessageQueue adminQ = new MessageQueue(@".private$Ack"); adminQ.MessageReadPropertyFilter.CorrelationId = True; msg = adminQ.Receive(new TimeSpan(0,0,5)); if (msg.MessageType = MessageType.Acknowledgment) { switch(msg.Acknowledgment) { case Acknowledgment.ReachQueue: break; case Acknowledgment.Receive: break; ...
  • 21. © Peter R. Egli 2015 21/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 12. Reliable messaging (3/3) 2. Acknowledgment types (2/2): There are different acknowledgment types available. The Message.AcknowledgeType property is a bit mask, so different acknowledgment types can be combined. 3. Property Message.Recoverable: If the property Message.Recoverable is set to true, MSMQ stores the message to hard disk so that in case of a crash the message may be recovered after a reboot. Acknowledgment type Description AcknowledgmentTypes.FullReachQueue Success and failure indication to be delivered to the queue. AcknowledgmentTypes.FullReceive Success and failure indication to be received from the queue by the application. AcknowledgmentTypes.NegativeReceive Negative acknowledgment to be sent when the application fails to receive the message from the queue (explicit negative acknowledgment). AcknowledgmentTypes.NotAcknowledgeReachQueue A mask used to request a negative acknowledgment when the original message cannot reach the queue. This can happen when the time-to-reach- queue timer expires or when a message cannot be authenticated. AcknowledgmentTypes.NotAcknowledgeReceive A mask used to request a negative acknowledgment when an error occurs that prevents the original message from being received from the queue before its time-to-be-received timer expires. AcknowledgmentTypes.PositiveArrival Successful delivery to the queue. AcknowledgmentTypes.PositiveReceive Successful receive from the queue by the application. AcknowledgmentTypes.None Request for no acknowledgment at all (neither positive nor negative).
  • 22. © Peter R. Egli 2015 22/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 13. Queue management A minimal tool for administering MSMQ can be found under Control Panel  Administrative Tools  Computer Management. Undelivered messages Public queues (created administratively or programmatically) Private queues with: a. Queue messages (successfully delivered to queue, but not retrieved by an application) b. Journal message (copies of messages in „Queue messages“ if the property UseJournalQueue is set to true on the queue) c. Triggers (contains triggers that fire when a message is placed in this queue) Global journal message queue MSMQ places a copy of every undeliverable message or message that expires before it is received into this queue. Same as the dead-letter queue, but for all transactional messages.
  • 23. © Peter R. Egli 2015 23/23 Rev. 1.80 MSMQ – Microsoft Message Queuing indigoo.com 14. MSMQ and WCF WCF (Windows Communication Foundation) is a unified communication framework for distributed applications. WCF defines a common programming model and unified API for clients and services to send messages between each other. WCF is very flexible and allows using different transport protocols for delivering messages. MSMQ is one of the transport mechanisms supported by WCF. The transport protocol is selected through a binding (the ‘B’ in ‘ABC’). WCF supports 2 bindings based on MSMQ: A. NetMsmqBinding: NetMsmqBinding is suitable when .Net WCF is used on both sides of the communication (sender and receiver). B. MsmqIntegrationBinding: MsmqIntegrationBinding may be used to connect a .Net WCF application to an existing native MSMQ application already in place.