DataQueueReader
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
Configuration
The table below provides descriptions for properties in the CPS.
Property | Description |
---|---|
Error handling configuration | The remedial actions to be taken when a particular error occurs can be configured using this attribute. Refer Error Handling section in Common Configurations for detailed information. |
Host Name | Hostname or IP of AS/400 Server. |
User Name | Username. |
Password | Password pertaining to the username. |
Queue Name | Name of AS/400 Queue. The complete path of the Queue has to be provided. |
Queue Size(bytes) | Size of the AS/400 queue. To read data from a queue whose exact size is not known, set the value to "-1" so that the microservice uses the maximum entry length. If it is set to "-1", make sure that the queue is already created. |
Auto Create Queue | Create queue automatically if it does not exist. It will also try to create the library (FIORANO1.LIB in Figure 1) if it does not exist, but make sure that the user has sufficient privileges. |
Receive Mode | Choose Asynchronous/ Synchronous mode of receiving messages. For Asynchronous mode and Synchronous with Scheduler enabled, the microservice will not have an input port. |
Wait Time(seconds) | Read timeout in seconds. Waits for the timeout specified to read messages from the queue. Provide -1 for infinite timeout. |
Enable Scheduler? | If 'yes', then the microservice runs in scheduling mode. This option is available only in Synchronous mode. If set to 'No', then the message sent to input message acts as a trigger to poll queue for the message. |
Scheduler Interval(seconds) | Interval in which the microservice polls queue for the message. This option is available only in Synchronous mode and when the scheduler is enabled. |
Close Connection | If set to yes, then the connection will be closed after receiving each message. |
Expert Properties
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.
Refer to the Pre/Post Processing XSL Configuration section under Common Configurations topic for details regarding XSL configuration. The properties comprising this XSL configuration are:
- Provide XSL
- XSLT Engine
- Transformation source data
- Set transformation result as
Post Processing XSL Configuration
Post Processing XSL configuration can be used to transform response message before sending it to the output port.
As mentioned in the above section, refer to the Pre/Post Processing XSL Configuration section under the Common Configurations topic for details regarding XSL configuration.
Process Message Based on Property
The property helps components to skip certain messages from processing.
Refer the Process Message Based On a Property section under the Common Configurations topic.
Testing
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.
Functional Demonstration
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
Sample Scenario
Sample Input
The figure below shows the sample input from the Feeder microservice.
Figure 4: Sending a sample text message from the Feeder microservice to DataQueueWriter
Sample Output
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