The DataQueueReader microservice can receive messages from AS400 Queues Synchronously and Asynchronously. In Synchronous mode, if Enable Scheduler is set to yes, it polls queue for messages at regular intervals, else, message received on the input port acts as a trigger to poll queue.
Configuration and Testing
The Configuration Property Sheet (CPS) of DataQueueWriter is shown in the figure below with the Expert Properties view enabled.
Figure 1: Sample DataQueueReader Configuration
The table below provides descriptions for properties in the CPS.
|Error handling configuration|
The remedial actions to be taken when a particular error occurs can be configured using this attribute.
Hostname or IP of AS/400 Server.
Password pertaining to the username.
Name of AS/400 Queue.
Size of the AS/400 queue.
Auto Create Queue
Create queue automatically if it does not exist.
Choose Asynchronous/ Synchronous mode of receiving messages. For Asynchronous mode and Synchronous with Scheduler enabled, the microservice will not have an input port.
Read timeout in seconds. Waits for the timeout specified to read messages from the queue. Provide -1 for infinite timeout.
If 'yes', then the microservice runs in scheduling mode.
Interval in which the microservice polls queue for the message.
If set to yes, then the connection will be closed after receiving each message.
Pre Processing XSL Configuration
Pre Processing XSL configuration can be used to transform request message before processing it. Click the small button against the property to configure the properties.
Post Processing XSL Configuration
Post Processing XSL configuration can be used to transform response message before sending it to the output port.
Process Message Based on Property
The property helps components to skip certain messages from processing.
The configuration can be validated using the Validate button. A sample result of the Validate operation is shown below.
Figure 2: Validating the configuration
Input Port: In case of Synchronous mode without scheduling, an input port is generated. Any message sent to the input port acts as a trigger for the microservice to poll AS/400 queue for the message.
Output Port: Receives the message read by the microservice.
Configure DataQueueReader as shown in Figure 1.
The figure below shows a sample Event process in which DataQueueReader listens to messages sent by DataQueueWriter.
Figure 3: Event process using the DataQueueReader
The figure below shows the sample input from the Feeder microservice.
Figure 4: Sending a sample text message from the Feeder microservice to DataQueueWriter
The figure below shows status messages sent by the DataQueueWriter microservice.
Figure 5: Status messages sent by the DataQueueWriter component
The figure below shows the message received by the DataQueueReader microservice.
Figure 6: Messages received by DataQueueReader