This chapter describes how to access the Message Feed server from the command line.
To submit messages, use the Message Feed client program, mfp, located in the $CORE_ROOT/bin
directory. You can run this program either directly from the command line or from a shell script or batch file.
For UNIX / Linux systems, the formal syntax for the Message Feed client program is:
mfp [-?V] [-h host] -s service -u user [-p password-file | -P password] -i integration -a activity [-m message-id] [-A attributes-file] -M message-file [-t timeout]
For Windows systems, the formal syntax for the Message Feed client program is:
mfp [/?] [/V] [/h host] /s service /u user [/p password-file | /P password] /i integration /a activity [/m message-id] [/A attributes-file] /M message-file [/t timeout]
Note: Tthe UNIX syntax is also accepted in Windows
Argument | Description |
---|---|
? |
Show command syntax and exit. |
V |
Show program revision and exit. |
h |
TCP/IP host on which the Message Feed server is running. This is an optional argument, the default value is localhost. |
s |
TCP/IP service used to connect to Message Feed server. This must be the same TCP/IP service as that defined for the Message Feed Server task. |
u |
User identification. The user must have defined in the Message Feed Manager. |
p |
File containing the password for the user. This option could be used instead of the P option. |
P |
Password for the user. This option could be used instead of the p option. |
i |
The integration in which the activity is defined. This is a qualified name containing any folders and integration name separated by the slash (/) character. The sequence \\ is used to specify a single \ character in a folder or integration name. The sequence \/ is used to specify a single / character in the folder or integration name. In B2Bi 2.x: Use “B2Bi 1” |
a |
The activity to in which the submitted message will be processed.
In B2Bi: Use “A02 MFP Inbound” |
m |
User defined message identifier which will be logged for the submitted message in the Message Log. This is an optional argument. |
A |
Path to a file that contains the attributes to set for the message being submitted. The file should contain one attribute on each line. Each attribute line has an attribute name followed by a = character, followed by the attribute value. The file can contain remark lines beginning with a # character. This is an optional argument. |
M |
Path to the file that contains the data contents of the message being submitted. |
t |
Timeout (in seconds) for the submitted message to be processed. This is an optional argument and the default timeout is 60 seconds. |
After you submit the message, the Message Feed client program writes two lines of output to the standard output. The first line contains the word LoggerId
followed by a tab and the logger identity assigned by the integration engine.
The second line contains the word Status
followed by a tab and one of the following status codes:
Code | Description |
---|---|
|
The submitted message was processed OK.
|
|
The submitted message was processed with some errors – One or several of the messages created from the submitted message was stopped. |
|
The submitted message was processed with error – All messages created from the submitted message were stopped. |
|
The submitted message was not processed within the timeout specified by the |
The following example submits the file message.dat
to the B2Bi integration A02 MFP Inbound
. The Message Feed server is located on remote host, host1
, listening on port 8877
. The Message Feed clients authenticate themselves to the Message Feed server using the username "admin" and password "secret".
mfp –h host1 –s 8877 –u admin –p secret –i “B2Bi 1” –a “A02 MFP Inbound” –M /usr/business_system/message.dat