Double-click the cMQConnectionFactory component to
display its Basic settings view in the
Component tab.
From the MQ Server list, select
an MQ server. In this use case, the default ActiveMQ server is used to handle the
messages.
In the Broker URI field, type
in the URI of the message broker. Here the default URI
"vm://localhost?broker.persistent=false" is used.
In the message producer sub-route, double-click the cFile component to display its Basic
settings view.
Define the properties of the cFile
component.
In this use case, simply specify the path to the folder that holds the
source file to be sent as electronic message, and leave the other parameters
as they are.
Double-click the cJMS component
labeled Message_producer to display its Basic settings view.
From the Type list, select queue to send the messages to a JMS queue.
In the Destination field, type
in a name for the JMS queue, "queue.hello" in this use
case.
Double-click the [...] button next to ConnectionFactory. Select the MQ connection
factory that you have just configured in the dialog box and click OK.
Switch to the message consumer sub-route, and double-click the
cJMS component labeled
Message_consumer to display its Basic settings view.
Configure the message consumer using exactly the same parameters as in the
message producer.
Double-click the cProcessor
component to display its Basic settings
view.
In the Code area, customize the code as
shown below to display the file names of the consumed messages on the
Run console.