MSMQ Send Service
The MSMQ Send service sends messages to a remote Microsoft® Message Queue.
The following table provides an overview of the MSMQ Send service:
Category | Description |
---|---|
System name | MSMQ Send Service |
Graphical Process Modeler (GPM) categories | All Services |
Description | Sends messages to a remote Microsoft® Message Queue. Sends a message from a business process to a named queue on a specified Microsoft Windows® MSMQ server. The MSMQ Send service also returns pertinent message metadata to the business process after sending the message. |
Business usage | Use the MSMQ Send Service to send a message to a remote Microsoft® Message Queue. |
Preconfigured? | Yes |
Requires third party files? | Yes. Requires msmqbundle_xxx.jar file. Sterling B2B Integrator installation includes msmqbundle_xxx.jar file in the <INSTALL_DIR>/client/msmq folder. |
Platform availability | All supported Sterling B2B Integrator platforms |
Related services | N/A |
Application requirements | Requirements:
|
Initiates business processes? | No |
Invocation | This service is invoked from a business process. |
Returned status values |
Returned status values:
|
Restrictions | Restrictions:
|
Persistence level | System Default (Full) |
Implementing the MSMQ Send Service
- Activate your license for the MSMQ Send service. For more information, see An Overview of Implementing Services.
- Install the MSMQPrime component. For information on installing MSMQPrime, see Installing MSMQPrime.
- Create and configure an MSMQ Send service configuration. For general instructions on creating a service configuration, see Creating a Service Configuration. For descriptions of the MSMQ Send service configuration parameters, see Configuring the MSMQ Send Service.
- Use the MSMQ Send service in a business process.
Installing MSMQPrime
A component of the MSMQ adapter, MSMQPrime, is deployed on the host where the MSMQ server resides. The MSMQ adapter connects to the MSMQPrime component, which in turn, performs the send and receive actions and interacts with the MSMQ server. MSMQPrime listens on the port that is part of the MSMQ adapter configuration.
- Locate msmqbundle_xxx.jar in Sterling B2B Integrator under <INSTALL_DIR>/client/msmq folder.
- On the Windows MSMQ server host, create a folder for MSMQPrime. For example, C:\MSMQ.
- Copy msmqbundle_xxx.jar to the folder you just created.
- Change directory to that folder, and unbundle the .jar file.
- Install the Java jdk version 1.6.0. Note the installation path.
-
Modify start_msmqPrime.cmd to use the folder you created in step 2. Set the MSMQADAPTER parameter to the folder you created in step 2. Set the JAVA parameter to point to the bin directory in the Java path created in step 7 (C:\jdk1.6.0\bin).
Note: If Java is installed in the default installation folder in C:\Program Files\Java\jdk1.6.0, you have to reference it as C:\Progra~1\Java\jdk1.6.0\bin. -
Change MSMQ_SERVER_PORT in msmqprim.properties, if necessary. The default is 8085. This is the port msmqPrime will run on.
-
Run start_msmqPrime.cmd. This script should be run by the user who has permission to create queues, read, and send messages to the MSMQ server. This process must be running continually if your MSMQ adapter needs to access it. It is recommended to convert it to an automatically started Windows service.
-
Create a configuration of the MSMQ adapter in Sterling B2B Integrator and configure it to point to this msmqPrime.
- Configure a service instance of MSMQ adapter in Sterling B2B Integrator to point to this msmqPrime.
-
Verify that the MSMQ adapter configuration is talking to this msmqPrime by including it in a business process and running it.
-
If desired for testing purposes, turn on debug mode in msmqPrime with the following command by passing -debug as an argument to MSMQPrimaImpl in start_msmq.cmd. The debugon option generates detailed logs.
Note: The msmqbundle_xxx.jar you use to create the MSMQPrime component must be from the same Sterling B2B Integrator installation as the MSMQ adapter that it will talk to. You need to redeploy the msmqbundle_xxx.jar to the Windows MSMQ server host when a Sterling B2B Integrator patch is installed. This ensures the new code changes are synchronized with MSMQPrime.
Installing MSMQPrime as a Windows Service
- Unbundle the msmqbundle_xxx.jar file. A directory called installJavaService is created.
-
Modify the installJavaService\InstallJavaService.cmd script to set the JAVA parameter to the bin directory in the Java path created in step 7 of installing the MSMQPrime component. Set the MSMQINSTALLDIR parameter to the folder created in step 2 of installing the MSMQPrime component.
-
If you want to turn on the debug mode in msmqPrime, set the PARAMS to debug. By default, debug is turned off.
-
Copy the msmqprim.properties file into the installJavaService folder. You can change MSMQ_SERVER_PORT in msmqprim.properties, so this msmqPrime will run on this port. The default port is 8085.
- Run installJavaService.cmd to install MSMQPrime as a Windows service.
-
To start the service, from the Windows Services applet, select the New MSMQ Send service and select Start.
-
To stop the service, from the Windows Services applet, select the New MSMQ Send service and select Stop.
Uninstalling MSMQPrime as a Windows Service
To uninstall MSMQPrime as a Windows Service, run the following command:
installJavaService\uninstallJavaService.cmd
Configuring the MSMQ Send Service
To configure the MSMQ Send service, you must specify settings for the following fields:
Field | Description |
---|---|
Name | Unique and meaningful name for the service configuration. Required. |
Description | Meaningful description for the service configuration, for reference purposes. Required. |
Select a Group | Select one of the following options:
Note: For more information about groups, see Managing Services and
Adapters.
|
Remote Host Name | Host name of the MSMQ server with which this configuration of the server communicates and where the MSMQPrime is installed. Required. |
Port Number Of Remote Host | The port number of the MSMQPrime host. Required. Default value is 8085. |
Queue Path Name | Typical queue path name configured in the MSMQ server in the form
Hostname\queueName . Optional. |
Document Storage Type | Indicate whether the message should be stored on the file system or in the
database. Select one of the following options:
|
GPM Configuration
The following table describes the parameters you need to specify for configuring MSMQ Send service in the GPM:
Field | Description |
---|---|
Action | Specifies the type of action. Valid value is Send. Default value is Send. Required. |
BodyType | Valid values are Byte array and String (default). Optional. |
Delivery | Valid values are Express and Recoverable (default). Optional. |
EncryptionAlgorithm | Valid values are CALG_RC2 and CALG_RC4. Optional. |
EX_TRANSACTION | Indicates whether to include send action in the Sterling B2B Integrator engine transaction. Valid values are True and False. Default value is False. Required. |
MaxTimeToReachQueue | Maximum time allowed for a message to reach its destination. Default is 300 seconds. Optional. |
MessageLabel | Label for message being sent to queue. Optional. |
MessagePriority | Valid values are 0 - 7, where 7 represents the highest priority messages in the
queue. The highest priority messages are received first. Default is 3. Optional. Note: This
parameter setting does not apply to messages sent to a transactional queue, which will always have a
message priority of 0.
|
PrivacyLevel | Used to request encryption. Valid values are None (default), Base (40-bit) and Enhanced (128-bit, supported in MSMQ version 2.0 and later). Optional. |
Output from Service to Business Process
The following table contains the parameter passed from the MSMQ Send service to the business process:
Field | Description |
---|---|
MSMQ_CORRELATIONID | ID number used to correlate related messages. Optional. |
Business Process Example
The following example business process illustrates using the MSMQ Send service:
<process name = "MSMQ_Base">
<sequence name="Test Sequence">
<operation name="MSMQ Commn">
<participant name="MSMQSend"/>
<output message="outmsg">
<assign to="Action">SEND</assign>
<assign to="PortNumber">8085</assign>
<assign to="QueuePathName">lando.labsci.local\testqueuetx</assign>
<assign to="MaxTimeToReachQueue">3600</assign>
<assign to="MessagePriority">3</assign>
<assign to="Delivery">RECOVERABLE</assign>
<assign to="PrivacyLevel">Base</assign>
<assign to="MessageLabel">Base</assign>
<assign to="BodyType">BYTE ARRAY</assign>
<assign to="GIS_TRANSACTION">TRUE</assign>
<assign to="." from="*" />
</output>
<input message="inmsg">
<assign to="." from="*" />
</input>
</operation>
</sequence>
</process>