Сервер очереди сообщений майкрософт msmq windows 10

From Wikipedia, the free encyclopedia

From Wikipedia, the free encyclopedia

Microsoft Message Queuing (MSMQ) is a message queue implementation developed by Microsoft and deployed in its Windows Server operating systems since Windows NT 4 and Windows 95. Windows Server 2016 and Windows 10 also includes this component. In addition to its mainstream server platform support, MSMQ has been incorporated into Microsoft Embedded platforms since 1999 and the release of Windows CE 3.0.[1]

Overview[edit]

MSMQ is a messaging protocol that allows applications running on separate servers/processes to communicate in a failsafe manner. A queue is a temporary storage location from which messages can be sent and received reliably, as and when conditions permit. This enables communication across networks and between computers, running Windows, which may not always be connected. By contrast, sockets and other network protocols assume that direct connections always exist.

MSMQ has been available to developers on Microsoft platforms since 1997,[2] and has commonly been used in enterprise software built with Visual Studio, both in the native pre-.NET incarnation (version 5 and 6), and in Visual Studio .NET. Microsoft also has incorporated MSMQ in its messaging technology framework, Windows Communication Foundation (WCF). Under WCF, MSMQ can be used for providing secure, reliable transport with a unified programming model compatible with other communications standards.

MSMQ is responsible for reliably delivering messages between applications inside and outside the enterprise. MSMQ ensures reliable delivery by placing messages that fail to reach their intended destination in a queue and then resending them once the destination is reachable. It also supports security and priority based messaging. Dead letter queues can be created for looking at messages which timed out or failed for other reasons.

MSMQ supports both durable and non-durable messaging to make a trade off between performance or consistency by writing messages to disk or only in RAM. Non-durable messaging can only be achieved by sending express messages via non-transactional queues.

MSMQ also supports transactions. It permits multiple operations on multiple queues, with all of the operations wrapped in a single transaction, thus ensuring that either all or none of the operations will take effect. Microsoft Distributed Transaction Coordinator (MSDTC) supports transactional access to MSMQ and other resources to achieve transactional exact once processing.

The following ports are used for Microsoft Message Queuing operations:

  • TCP: 1801
  • RPC: 135, 2101*, 2103*, 2105*
  • UDP: 3527, 1801
  • * These port numbers may be incremented by 11 if the initial choice of RPC port is being used when Message Queuing initializes. Port 135 is queried to discover the 2xxx ports.[3]

Version references[edit]

  • Version 1.0 (May 1997). Supports Windows 95, Windows NT 4.0 SP3, Windows 98 and Windows Me.
  • Version 2.0, included with Windows 2000.
    • New features include:[4] Support for registering public message queues in Active Directory, 128-bit encryption and digital certificate support, full COM support for message properties (achieving functional parity with the Win32 API function calls, full DNS path name support, improved performance in multi-threaded applications.
  • Version 3.0, included with Windows XP (Professional, not Home Edition) and Windows Server 2003.
    • New features include:[5] Internet Messaging (referencing queues via HTTP, SOAP-formatted messages, MSMQ support for Internet Information Services), queue aliases, multicasting of messages, and additional support for programmatic maintenance and administration of queues and MSMQ itself.
  • Version 4.0, part of Windows Vista and Windows Server 2008.
    • New features include:[6] Subqueues,[7] improved support for «poison messages» (messages which continually fail to be processed correctly by the receiver), and support for transactional receives of messages from a remote queue.
  • Version 5.0, part of Windows 7 and Windows Server 2008 R2.
    • New features include:[8] support for Secure Hash Algorithm 2.0 (SHA2) and all advanced hash algorithms that are supported in Windows 2008 R2; by default, weaker hash algorithms are disabled.
  • Version 6.0, part of Windows 8 and Windows Server 2012.
  • Version 6.3, part of Windows 8.1 and Windows Server 2012 R2.

Uses[edit]

MSMQ is heavily used in various Windows Platform-based contact center applications which uses this service for internal notifications and services.

See also[edit]

  • List of Microsoft Windows components
  • Java Message Service, similar technology on the Java platform
  • Amazon Simple Queue Service, commoditized messaging service provided by Amazon.com for a per-use fee. It allows users to rent access to messaging without having to maintain their own server.
  • RabbitMQ, open source message queue broker that implements a pre-standard version of AMQP.[9]

References[edit]

  1. ^ «Microsoft Windows CE 3.0 Message Queuing Service». Microsoft Developer Network. Retrieved 2009-11-25.
  2. ^ InformationWeek News Connects The Business Technology Community. Informationweek.com (2014-02-04). Retrieved on 2014-02-22. Archived April 10, 2008, at the Wayback Machine
  3. ^ TCP ports, UDP ports, and RPC ports that are used by Message Queuing. Support.microsoft.com (2011-09-28). Retrieved on 2014-02-22.
  4. ^ «Cloud Administrator». Azure Cloud Administrator. Dayasagar Roy. Archived from the original on 2018-11-24. Retrieved 2006-08-05.
  5. ^ «Cloud Administrator». Azure. Dayasagar Roy. Archived from the original on 2018-11-24. Retrieved 2006-08-05.
  6. ^ «Cloud Administrator». Azure. Dayasagar Roy. Archived from the original on 2018-11-24. Retrieved 2006-08-05.
  7. ^ Sub-queues in MSMQ 4.0
  8. ^ «Cloud Administrator». Azure. Dayasagar Roy. Retrieved 2006-08-05.
  9. ^ «ISO/IEC 19464:2014 — Information technology — Advanced Message Queuing Protocol (AMQP) v1.0 specification». www.iso.org. Retrieved 2017-11-07.

External links[edit]

  • MSDN documentation

From Wikipedia, the free encyclopedia

Microsoft Message Queuing (MSMQ) is a message queue implementation developed by Microsoft and deployed in its Windows Server operating systems since Windows NT 4 and Windows 95. Windows Server 2016 and Windows 10 also includes this component. In addition to its mainstream server platform support, MSMQ has been incorporated into Microsoft Embedded platforms since 1999 and the release of Windows CE 3.0.[1]

Overview[edit]

MSMQ is a messaging protocol that allows applications running on separate servers/processes to communicate in a failsafe manner. A queue is a temporary storage location from which messages can be sent and received reliably, as and when conditions permit. This enables communication across networks and between computers, running Windows, which may not always be connected. By contrast, sockets and other network protocols assume that direct connections always exist.

MSMQ has been available to developers on Microsoft platforms since 1997,[2] and has commonly been used in enterprise software built with Visual Studio, both in the native pre-.NET incarnation (version 5 and 6), and in Visual Studio .NET. Microsoft also has incorporated MSMQ in its messaging technology framework, Windows Communication Foundation (WCF). Under WCF, MSMQ can be used for providing secure, reliable transport with a unified programming model compatible with other communications standards.

MSMQ is responsible for reliably delivering messages between applications inside and outside the enterprise. MSMQ ensures reliable delivery by placing messages that fail to reach their intended destination in a queue and then resending them once the destination is reachable. It also supports security and priority based messaging. Dead letter queues can be created for looking at messages which timed out or failed for other reasons.

MSMQ supports both durable and non-durable messaging to make a trade off between performance or consistency by writing messages to disk or only in RAM. Non-durable messaging can only be achieved by sending express messages via non-transactional queues.

MSMQ also supports transactions. It permits multiple operations on multiple queues, with all of the operations wrapped in a single transaction, thus ensuring that either all or none of the operations will take effect. Microsoft Distributed Transaction Coordinator (MSDTC) supports transactional access to MSMQ and other resources to achieve transactional exact once processing.

The following ports are used for Microsoft Message Queuing operations:

  • TCP: 1801
  • RPC: 135, 2101*, 2103*, 2105*
  • UDP: 3527, 1801
  • * These port numbers may be incremented by 11 if the initial choice of RPC port is being used when Message Queuing initializes. Port 135 is queried to discover the 2xxx ports.[3]

Version references[edit]

  • Version 1.0 (May 1997). Supports Windows 95, Windows NT 4.0 SP3, Windows 98 and Windows Me.
  • Version 2.0, included with Windows 2000.
    • New features include:[4] Support for registering public message queues in Active Directory, 128-bit encryption and digital certificate support, full COM support for message properties (achieving functional parity with the Win32 API function calls, full DNS path name support, improved performance in multi-threaded applications.
  • Version 3.0, included with Windows XP (Professional, not Home Edition) and Windows Server 2003.
    • New features include:[5] Internet Messaging (referencing queues via HTTP, SOAP-formatted messages, MSMQ support for Internet Information Services), queue aliases, multicasting of messages, and additional support for programmatic maintenance and administration of queues and MSMQ itself.
  • Version 4.0, part of Windows Vista and Windows Server 2008.
    • New features include:[6] Subqueues,[7] improved support for «poison messages» (messages which continually fail to be processed correctly by the receiver), and support for transactional receives of messages from a remote queue.
  • Version 5.0, part of Windows 7 and Windows Server 2008 R2.
    • New features include:[8] support for Secure Hash Algorithm 2.0 (SHA2) and all advanced hash algorithms that are supported in Windows 2008 R2; by default, weaker hash algorithms are disabled.
  • Version 6.0, part of Windows 8 and Windows Server 2012.
  • Version 6.3, part of Windows 8.1 and Windows Server 2012 R2.

Uses[edit]

MSMQ is heavily used in various Windows Platform-based contact center applications which uses this service for internal notifications and services.

See also[edit]

  • List of Microsoft Windows components
  • Java Message Service, similar technology on the Java platform
  • Amazon Simple Queue Service, commoditized messaging service provided by Amazon.com for a per-use fee. It allows users to rent access to messaging without having to maintain their own server.
  • RabbitMQ, open source message queue broker that implements a pre-standard version of AMQP.[9]

References[edit]

  1. ^ «Microsoft Windows CE 3.0 Message Queuing Service». Microsoft Developer Network. Retrieved 2009-11-25.
  2. ^ InformationWeek News Connects The Business Technology Community. Informationweek.com (2014-02-04). Retrieved on 2014-02-22. Archived April 10, 2008, at the Wayback Machine
  3. ^ TCP ports, UDP ports, and RPC ports that are used by Message Queuing. Support.microsoft.com (2011-09-28). Retrieved on 2014-02-22.
  4. ^ «Cloud Administrator». Azure Cloud Administrator. Dayasagar Roy. Archived from the original on 2018-11-24. Retrieved 2006-08-05.
  5. ^ «Cloud Administrator». Azure. Dayasagar Roy. Archived from the original on 2018-11-24. Retrieved 2006-08-05.
  6. ^ «Cloud Administrator». Azure. Dayasagar Roy. Archived from the original on 2018-11-24. Retrieved 2006-08-05.
  7. ^ Sub-queues in MSMQ 4.0
  8. ^ «Cloud Administrator». Azure. Dayasagar Roy. Retrieved 2006-08-05.
  9. ^ «ISO/IEC 19464:2014 — Information technology — Advanced Message Queuing Protocol (AMQP) v1.0 specification». www.iso.org. Retrieved 2017-11-07.

External links[edit]

  • MSDN documentation

This article applies as of PRTG 22

MSMQ Message Queuing

To use the Windows MSMQ Queue Length sensor in PRTG, you need to start the Message Queuing service on both the probe system and the target system. You can start services via services.msc.

Message Queuing is only automatically installed on some Windows Server versions. Depending on the Windows version you are using, you might have to install the Microsoft Message Queue (MSMQ) Server first.

For details, see Installing and Managing Message Queuing.
Applies to: Windows 7, Windows 8, Windows Server 2008 R2, Windows Server 2012, Windows 10, Windows Server 2016

Directory Service Integration

Note: When installing the MSMQ Server, make sure it also includes the Directory Service. Depending on your Windows installation, this might have different names, such as

  • MSMQ Active Directory Domain Service Integration
  • Directory Service Integration
  • Active Directory Integration
Windows Server 2012 R2 and Windows Server 2016

Windows Server 2012 R2
Click to enlarge.

Windows 10

Windows 10

Windows Server 2008 R2

Windows 2008 R2
Click to enlarge.

Windows 7

Windows 7

More

  • Problem monitoring Messaging Queue (MSMQ)

BDU:2022-01328: Уязвимость службы очереди сообщений Microsoft Message Queue (MSMQ) Server операционной системы Microsoft Windows, позволяющая получить несанкционированный доступ к защищаемой информации

Описание уязвимости Уязвимость службы очереди сообщений Microsoft Message Queue (MSMQ) Server операционной системы Microsoft Windows связана с раскрытием информации. Эксплуатация уязвимости может позволить нарушителю, действующему удаленно, получить несанкционированный доступ к защищаемой информации
Вендор Microsoft Corp.
Наименование ПО Windows
Версия ПО
  • Server 2008 R2 SP1
  • 7 SP1
  • Server 2008 SP2
  • 8.1
  • Server 2012
  • Server 2012 R2
  • 10
  • 10 1607
  • Server 2016
  • 8.1 RT
  • Server 2008 SP2 Server Core installation
  • Server 2012 R2 Server Core installation
  • Server 2016 Server Core installation
  • Server 2008 R2 SP1 Server Core installation
  • Server 2012 Server Core installation
  • 10 1809
  • Server 2019
  • Server 2019 Server Core installation
  • 10 1909
  • 10 2004
  • Server 2004 Server Core Installation
  • 10 20H2
  • Server 20H2 Server Core Installation
  • 10 21H1
  • Server 2022
  • Server 2022 Server Core installation
  • 11
  • 10 21H2
Тип ПО Операционная система
Операционные системы и аппаратные платформы
  • Microsoft Corp. Windows Server 2008 R2 SP1 64-bit
  • Microsoft Corp. Windows 7 SP1 64-bit
  • Microsoft Corp. Windows Server 2008 SP2 32-bit
  • Microsoft Corp. Windows 7 SP1 32-bit
  • Microsoft Corp. Windows 8.1 64-bit
  • Microsoft Corp. Windows 8.1 32-bit
  • Microsoft Corp. Windows Server 2008 SP2 64-bit
  • Microsoft Corp. Windows Server 2012
  • Microsoft Corp. Windows Server 2012 R2
  • Microsoft Corp. Windows 10 64-bit
  • Microsoft Corp. Windows 10 32-bit
  • Microsoft Corp. Windows 10 1607 64-bit
  • Microsoft Corp. Windows 10 1607 32-bit
  • Microsoft Corp. Windows Server 2016
  • Microsoft Corp. Windows 8.1 RT
  • Microsoft Corp. Windows Server 2008 SP2 Server Core installation 64-bit
  • Microsoft Corp. Windows Server 2008 SP2 Server Core installation 32-bit
  • Microsoft Corp. Windows Server 2012 R2 Server Core installation
  • Microsoft Corp. Windows Server 2016 Server Core installation
  • Microsoft Corp. Windows Server 2008 R2 SP1 Server Core installation 64-bit
  • Microsoft Corp. Windows Server 2012 Server Core installation
  • Microsoft Corp. Windows 10 1809 64-bit
  • Microsoft Corp. Windows 10 1809 32-bit
  • Microsoft Corp. Windows Server 2019
  • Microsoft Corp. Windows Server 2019 Server Core installation
  • Microsoft Corp. Windows 10 1809 ARM64
  • Microsoft Corp. Windows 10 1909 32-bit
  • Microsoft Corp. Windows 10 1909 64-bit
  • Microsoft Corp. Windows 10 1909 ARM64
  • Microsoft Corp. Windows 10 2004 32-bit
  • Microsoft Corp. Windows 10 2004 64-bit
  • Microsoft Corp. Windows 10 2004 ARM64
  • Microsoft Corp. Windows Server 2004 Server Core Installation
  • Microsoft Corp. Windows 10 20H2 ARM64
  • Microsoft Corp. Windows 10 20H2 32-bit
  • Microsoft Corp. Windows 10 20H2 64-bit
  • Microsoft Corp. Windows Server 20H2 Server Core Installation
  • Microsoft Corp. Windows 10 21H1 32-bit
  • Microsoft Corp. Windows 10 21H1 64-bit
  • Microsoft Corp. Windows 10 21H1 ARM64
  • Microsoft Corp. Windows Server 2022
  • Microsoft Corp. Windows Server 2022 Server Core installation
  • Microsoft Corp. Windows 11 64-bit
  • Microsoft Corp. Windows 11 ARM64
  • Microsoft Corp. Windows 10 21H2 64-bit
  • Microsoft Corp. Windows 10 21H2 32-bit
  • Microsoft Corp. Windows 10 21H2 ARM64
Тип ошибки Раскрытие информации
Идентификатор типа ошибки
  • CWE-200
Класс уязвимости Уязвимость кода
Дата выявления 14.12.2021
Базовый вектор уязвимости
  • CVSS 2.0: AV:N/AC:M/Au:N/C:C/I:N/A:N
  • CVSS 3.0: AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Уровень опасности уязвимости Высокий уровень опасности (базовая оценка CVSS 2.0 составляет 7,1)
Высокий уровень опасности (базовая оценка CVSS 3.0 составляет 7,5)
Возможные меры по устранению уязвимости

Использование рекомендаций производителя:
https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-43236

Статус уязвимости Подтверждена производителем
Наличие эксплойта Данные уточняются
Способ эксплуатации
  • Несанкционированный сбор информации
Способ устранения Обновление программного обеспечения
Информация об устранении Уязвимость устранена
Ссылки на источники

https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-43236

Идентификаторы других систем описаний уязвимостей
  • CVE: CVE-2021-43236
Прочая информация Данные уточняются

What is MSMQ?

From Microsoft:

Microsoft Message Queuing (MSMQ) technology enables applications
running at different times to communicate across heterogeneous
networks and systems that may be temporarily offline. MSMQ provides
guaranteed message delivery, efficient routing, security, and
priority-based messaging. It can be used to implement solutions for
both asynchronous and synchronous messaging scenarios.

From a user on Stack Overflow:

It’s just a queue manager.

You can Send objects (serialized) to the queue where they will stay
until you Receive them. It’s normally used to send messages or objects
between applications in a decoupled way.

It has nothing to do with webservices, they are two different things

Can you disable it? What happens?

When the MSMQ service is uninstalled the following actions are also
carried out:

  1. All existing queues and queue configuration information is deleted
  2. All messages contained in those queue and the system dead letter queue
    (DLQ) is deleted

(Source)

In a nutshell

The service started coming installed on Windows 8 and up systems (to my knowledge), which may be why you didn’t see it on 7. Removing it only affects itself, and if you aren’t using it then nothing should be affected.

Disabling the service you know how to do, but you can also remove it using Add & Remove Features

Содержание

  1. Зачем Windows 10 нужна служба очереди сообщений и почему она установлена по умолчанию?
  2. 1 ответов
  3. что такое MSMQ?
  4. вы можете отключить его? Что происходит?
  5. в двух словах
  6. Microsoft Message Queuing (MSMQ) – промежуточная среда обмена сообщениями
  7. 5.1. Служба обмена сообщениями MSMQ
  8. 5.2. Инфраструктура, необходимая для использования MSMQ
  9. [MS-MQOD]: Message Queuing Protocols Overview
  10. Published Version
  11. Previous Versions
  12. Preview Versions
  13. Development Resources
  14. Intellectual Property Rights Notice for Open Specifications Documentation
  15. Содержание
  16. Обзор
  17. Ссылки на версии
  18. Использует
  19. What is Microsoft Message Queuing (MSMQ)? How does it work?
  20. 9 Answers 9

Зачем Windows 10 нужна служба очереди сообщений и почему она установлена по умолчанию?

я обновил две системы с Windows 7 до 10, и обе имеют службу MSMQ, установленную после обновления. Ни одна из этих систем не была установлена раньше.

наличие службы не является проблемой само по себе, но он или служба зависимостей прослушивает TCP-порт 80 через Microsoft HTTP API (системный процесс PID 4), и я не могу запустить Apache из-за этого.

до сих пор мои поиски ответов были бесплодны, потому что большинство результатов, которые я нахожу, имеют дело с установка и настройка MSMQ, но не это цель на недавно установленной системе Win10.

У меня два вопроса:

1 ответов

что такое MSMQ?

технология Microsoft Message Queuing (MSMQ) позволяет приложениям в гетерогенных сети и системы, которые могут быть временно отключены. MSMQ обеспечивает гарантированная доставка сообщений, эффективная маршрутизация, обмен сообщениями на основе приоритетов. Он может быть использован для реализации решения асинхронный и синхронный обмен сообщениями варианты развития.

от пользователя Переполнение Стека:

это просто администратор очередей.

вы можете отправлять объекты (сериализованные) в очередь, где они будут находиться пока вы не получите их. Обычно используется для отправки сообщений или объектов между применениями в decoupled путе.

Это не имеет ничего общего с веб-сервисов, это две разные вещи

вы можете отключить его? Что происходит?

когда служба msmq удаляется следующие действия осуществляется:

в двух словах

служба начала приходить установлен на Windows 8 и up systems (насколько мне известно), поэтому вы не видели его на 7. Удаление его влияет только на себя, и если вы не используете его, то ничего не должно быть затронуто.

отключив службу вы знаете, как это сделать, но вы также можете удалить его с помощью Add & Remove Features

Источник

Microsoft Message Queuing (MSMQ) – промежуточная среда обмена сообщениями

5.1. Служба обмена сообщениями MSMQ

При отправке сообщения с использованием MSMQ посылающему приложению необходимо указать имя компьютера и очереди, в которую его необходимо доставить. После вызова приложением функции отправки сообщение сохраняется в локальной исходящей очереди. Затем MSMQ определяет имя компьютера и очереди, куда необходимо передать сообщение. Возможны следующие случаи:

05 01

После определения имени компьютера с очередью назначения, MSMQ проверяет доступность компьютера (пакетом UDP ) и в случае ответа сразу пытается отправить ему сообщение, повторяя попытки с интервалом по умолчанию 5 секунд. Если сообщение не удается отправить, то обычно каждые 5 минут служба сообщений пытается найти новый пункт назначения сообщения, используя маршрутизацию MSMQ. Процесс пересылки сообщения между компьютерами повторяется, пока оно не достигнет очереди назначения. С момента поступления сообщения в указанную при отправке очередь любое использующее MSMQ приложение с необходимыми правами доступа может прочитать это сообщение (рис. 5.1).

Таким образом, MSMQ поддерживает асинхронную передачу сообщений, при которой участвующие в обмене компоненты распределенной системы не обязательно должны функционировать в один и тот же момент времени.

5.2. Инфраструктура, необходимая для использования MSMQ

В MSMQ существуют два вида очередей – общие ( public ) и частные ( private ). Как частные, так и общие очереди могут либо использовать, либо не использовать транзакции, что задается при создании очереди и не может быть изменено в дальнейшем.

Источник

[MS-MQOD]: Message Queuing Protocols Overview

Provides an overview of the functionality and relationship of the protocols used for Message Queuing. Microsoft Message Queuing (MSMQ) is a communications service that enables reliable and secure asynchronous messaging between applications over a variety of deployment topologies. The Message Queuing protocols are specified in [MS-MQMQ], [MS-MQDMPR], [MC-MQAC], [MS-MQMP], [MS-MQQB], [MS-MQBR], [MC-MQSRM], [MS-MQCN], [MS-MQMR], [MS-MQSD], [MS-MQDS], [MS-MQDSSM], [MS-MQQP], and [MS-MQRR].

This page and associated content may be updated frequently. We recommend you subscribe to the RSS feed to receive update notifications.

Published Version

Previous Versions

Preview Versions

The preview period for a technical document varies. Additionally, not every technical document will be published for preview.

Development Resources

Find resources for creating interoperable solutions for Microsoft software, services, hardware, and non-Microsoft products:

Intellectual Property Rights Notice for Open Specifications Documentation

Technical Documentation. Microsoft publishes Open Specifications documentation (“this documentation”) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter-protocol relationships and interactions.

Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation.

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred.

Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise.

Tools. The Open Specifications documentation does not require the use of Microsoft programming tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments, you are free to take advantage of them. Certain Open Specifications documents are intended for use in conjunction with publicly available standards specifications and network programming art and, as such, assume that the reader either is familiar with the aforementioned material or has immediate access to it.

Источник

Содержание

Обзор

MSMQ отвечает за надежную доставку сообщений между приложениями внутри и за пределами предприятия. MSMQ обеспечивает надежную доставку, помещая сообщения, которые не достигают предполагаемого места назначения, в очередь, а затем повторно отправляет их, когда место назначения становится доступным. Он также поддерживает безопасность и обмен сообщениями на основе приоритетов. Очереди недоставленных сообщений могут быть созданы для просмотра сообщений, срок действия которых истек или не удалось по другим причинам.

MSMQ поддерживает как долговременный, так и кратковременный обмен сообщениями, чтобы найти компромисс между производительностью или согласованностью путем записи сообщений на диск или только в ОЗУ. Кратковременный обмен сообщениями может быть достигнут только путем отправки экспресс-сообщений через нетранзакционные очереди.

MSMQ также поддерживает транзакции. Он позволяет выполнять несколько операций с несколькими очередями, причем все операции заключены в одну транзакцию, что гарантирует, что все операции или ни одна из них не вступят в силу. Координатор распределенных транзакций Microsoft (MSDTC) поддерживает транзакционный доступ к MSMQ и другим ресурсам для достижения точной транзакции после обработки.

Следующие порты используются для операций Microsoft Message Queuing:

Ссылки на версии

Использует

MSMQ широко используется в различных приложениях контакт-центров на платформе Windows, которые используют эту службу для внутренних уведомлений и служб.

Источник

What is Microsoft Message Queuing (MSMQ)? How does it work?

I need to work with MSMQ (Microsoft Message Queuing). What is it, what is it for, how does it work? How is it different from web services?

aoymS

9 Answers 9

With all due respect to @Juan’s answer, both are ways of exchanging data between two disconnected processes, i.e. interprocess communication channels (IPC). Message queues are asynchronous, while webservices are synchronous. They use different protocols and back-end services to do this so they are completely different in implementation, but similar in purpose.

You would want to use message queues when there is a possibility that the other communicating process may not be available, yet you still want to have the message sent at the time of the client’s choosing. Delivery will occur the when process on the other end wakes up and receives notification of the message’s arrival.

As its name states, it’s just a queue manager.

You can Send objects (serialized) to the queue where they will stay until you Receive them. It’s normally used to send messages or objects between applications in a decoupled way

It has nothing to do with webservices, they are two different things

Info on MSMQ:

Info on WebServices:

ZVLuQ

Transactional Queue Management 101

A transactional queue is a middleware system that asynchronously routes messages of one sort of another between hosts that may or may not be connected at any given time. This means that it must also be capable of persisting the message somewhere. Examples of such systems are MSMQ and IBM MQ

A Transactional Queue can also participate in a distributed transaction, and a rollback can trigger the disposal of messages. This means that a message is guaranteed to be delivered with at-most-once semantics or guaranteed delivery if not rolled back. The message won’t be delivered if:

Host A posts the message but Host B is not connected

Something (possibly but not necessarily initiated from Host A) rolls back the transaction

B connects after the transaction is rolled back

In this case B will never be aware the message even existed unless informed through some other medium. If the transaction was rolled back, this probably doesn’t matter. If B connects and collects the message before the transaction is rolled back, the rollback will also reverse the effects of the message on B.

Note that A can post the message to the queue with the guarantee of at-most-once delivery. If the transaction is committed Host A can assume that the message has been delivered by the reliable transport medium. If the transaction is rolled back, Host A can assume that any effects of the message have been reversed.

Web Services

A web service is remote procedure call or other service (e.g. RESTFul API’s) published by a (typically) HTTP Server. It is a synchronous request/response protocol and has no guarantee of delivery built into the protocol. It is up to the client to validate that the service has been correctly run. Typically this will be through a reply to the request or timeout of the call.

In the latter case, web services do not guarantee at-most-once semantics. The server can complete the service and fail to deliver a response (possibly through something outside the server going wrong). The application must be able to deal with this situation.

IIRC, RESTFul services should be idempotent (the same state is achieved after any number of invocations of the same service), which is a strategy for dealing with this lack of guaranteed notification of success/failure in web service architectures. The idea is that conceptually one writes state rather than invoking a service, so one can write any number of times. This means that a lack of feedback about success can be tolerated by the application as it can re-try the posting until it gets a ‘success’ message from the server.

Источник

Аннотация: Рассматривается система фирмы Microsoft для обмена сообщениями между программами. Приводятся примеры применения среды MSMQ при использовании .NET Framework 2.0. Даются рекомендации по использованию систем обмена сообщениями в распределенных системах.

5.1. Служба обмена сообщениями MSMQ

В настоящий момент существует несколько основных разработок в области
промежуточного программного обеспечения для работы с очередями сообщений.
Наиболее известными разработками являются такие системы очередей сообщений, как
MSMQ, Sun Java System Message Queue, IBM MQSeries, Oracle Advanced Queing.
Промежуточная среда MSMQ – разработка Microsoft для асинхронной передачи
сообщений внутри локальной сети, впервые появившаяся в составе операционной
системы Windows NT. В настоящее время последней является версия MSMQ 3.0,
включенная в Windows XP PE и 2003 Server, достаточно актуальна так же версия 2.0,
включенная в состав операционной системы Windows 2000.

Служба MSMQ позволяет произвольному набору приложений добавлять
сообщения в некоторую очередь, и произвольному же набору – читать сообщения из
очереди. Приложению, использующему MSMQ, доступны следующие основные
операции:

  • добавить сообщение в очередь;
  • извлечь первое сообщение из очереди;
  • установить обработчик, вызываемый при появлении сообщения.

Структура сообщения определяется приложением, и может быть произвольной, с
ограничением на размер одного сообщения (2Мб для MSMQ 2.0). Далее будет
рассмотрено использование MSMQ 2.0/3.0 при разработке приложений с
использованием .NET Framework.

При отправке сообщения с использованием MSMQ посылающему приложению
необходимо указать имя компьютера и очереди, в которую его необходимо доставить.
После вызова приложением функции отправки сообщение сохраняется в локальной
исходящей очереди. Затем MSMQ определяет имя компьютера и очереди, куда
необходимо передать сообщение. Возможны следующие случаи:

  • сообщение доставляется сразу в указанную отправителем очередь (прямая доставка);
  • сообщение посылается в некоторую промежуточную очередь,
    определяемую маршрутизатором службы сообщений;
  • MSMQ определяет, что сообщение требуется разослать в несколько очередей
    (возможность поддерживается начиная с MSMQ 3.0).

Пересылка сообщения в промежуточной среде MSMQ

Рис.
5.1.
Пересылка сообщения в промежуточной среде MSMQ

После определения имени компьютера с очередью назначения, MSMQ проверяет
доступность компьютера (пакетом UDP) и в случае ответа сразу пытается отправить
ему сообщение, повторяя попытки с интервалом по умолчанию 5 секунд. Если
сообщение не удается отправить, то обычно каждые 5 минут служба сообщений
пытается найти новый пункт назначения сообщения, используя маршрутизацию
MSMQ. Процесс пересылки сообщения между компьютерами повторяется, пока оно не
достигнет очереди назначения. С момента поступления сообщения в указанную при
отправке очередь любое использующее MSMQ приложение с необходимыми правами
доступа может прочитать это сообщение (рис. 5.1).

Таким образом, MSMQ поддерживает асинхронную передачу сообщений, при
которой участвующие в обмене компоненты распределенной системы не обязательно
должны функционировать в один и тот же момент времени.

Благодаря службе маршрутизации сообщений возможно создание моста между
MSMQ и аналогичной технологией IBMIBM Websphere MQ (ранее MQSeries).
Websphere MQ может использоваться и напрямую программами .NET Framework,
однако обычно это менее удобно, чем использование MSMQ, и может быть связано с
дополнительными затратами – служба MSMQ уже входит в большинство систем
семейства Windows. Использование моста MSMQ-MQSeries позволяет создавать
гетерогенные распределенные системы на основе обмена сообщениями, поскольку
технология IBM MQ является изначально межплатформенной.

Приложение может вести поиск нужной ему очереди по ряду критериев. Это
возможно при использовании механизма общих очередей в Microsoft Message Queuing,
что требует развертывания Microsoft Active Directory.

5.2. Инфраструктура, необходимая для использования MSMQ

Служба MSMQ может работать как в составе домена Active Directory, так и при отсутствии такого домена, но во втором случае невозможно использовать ряд возможностей MSMQ, а именно:

  • не поддерживается шифрование передаваемых сообщений;
  • не поддерживаются общие очереди и механизмы их обнаружения;
  • не поддерживается маршрутизация сообщений и групповая рассылка сообщений.

В MSMQ существуют два вида очередей – общие (public) и частные (private). Как
частные, так и общие очереди могут либо использовать, либо не использовать
транзакции, что задается при создании очереди и не может быть изменено в дальнейшем.

Информация об общих очередях публикуется в службе каталогов Active Directory.
Путь к общей очереди имеет вид ComputerNameQueueName, возможна также запись
пути в виде .QueueName для очереди на локальном компьютере. Посылающее
сообщение приложение может искать доступные в домене общие очереди по заданным
критериям. Возможна также проверка приложением наличия общей очереди на
удаленном компьютере и ее создание. Для использования общих очередей требуется
развертывание MSMQ в рамках домена Active Directory.

Частные очереди доступны как при наличии домена, так и при его отсутствии. Путь
к такой очереди имеет вид ComputerNamePrivate$QueueName или .Private$QueueName для локального компьютера. Приложение, не
имеет возможности ни создать, ни проверить наличие частной очереди на удаленном
компьютере при использовании средств библиотеки FCL.

В MSMQ 3.0 появилась возможность посылать сообщения в общую или частную
очередь по протоколу HTTP при наличии на удаленном компьютере службы Internet
Information Services (IIS). В этом случае используется путь к очереди вида
http://domain.name/msmq/private$/queuename.
Посылающий сообщения компьютер так же должен поддерживать HTTP для MSMQ, иначе он не сможет
получать какие-либо ответы. При чтении сообщений использовать HTTP-формат имени
очереди невозможно.

MSMQ поддерживает два вида имени очереди – прямой вид ( direct name ) и путь к
очереди ( path name ). При использовании частных очередей на удаленном компьютере
обычно необходимо использовать прямой путь к очереди. При использовании MSMQ
программами на .NET Framework прямой путь записывается следующим образом:

  • Formatname:DIRECT=OS:server01QueueName – прямое имя общей очереди на компьютере server01;
  • Formatname:DIRECT=OS:ws02Private$QueueName
    прямое имя частной очереди на компьютере ws02;
  • Formatname:DIRECT=TCP:192.168.30.1private$QueueName
    прямое имя частной очереди на компьютере с адресом 192.168.30.1.

Полноценная работа с очередями возможна только в пределах локальной или
виртуально частной сети, поскольку при чтении сообщений используется Windows RPC
(в частности, обращения на 135-й порт). Кроме этого, среда MSMQ не способна
функционировать при использовании NAT, за исключением случая HTTP-имени очереди.

Понравилась статья? Поделить с друзьями:
  • Связь с windows на samsung galaxy
  • Сервер обновления времени windows 7 для россии
  • Секретные кнопки на клавиатуре windows 10
  • Сервер rpc недоступен windows server 2003 r2
  • Связь с windows samsung что это такое