IBMStreams com.ibm.streamsx.jms Toolkit > com.ibm.streamsx.jms 2.0.0 > com.ibm.streamsx.jms > JMSSource > Examples
This example shows the use of multiple JMSSource operators with different parameter combinations.
composite Main { graph // JMSSource operator with the default etc/connections.xml(relative to the application directory) // connections document stream <int32 id, rstring fname, rstring lname> MyPersonNamesStream = JMSSource() { param connection : "amqConn"; access : "amqAccess"; } // JMSSource operator with fully qualified name of connections.xml stream <int32 id, rstring fname, rstring lname> MyPersonNamesStream = JMSSource() { param connectionDocument : "/home/streamsuser/connections/JMSconnections.xml"; connection : "amqConn"; access : "amqAccess"; } // JMSSource operator with optional output error port specified (stream <int32 id, rstring fname, rstring lname> MyPersonNamesStream ; stream <rstring errorMessage> ErrorStream) = JMSSource() { param connection : "amqConn"; access : "amqAccess"; } // JMSSource operator with optional initDelay and reconnectionPolicy specified stream <int32 id, rstring fname, rstring lname> MyPersonNamesStream = JMSSource() { param connection : "amqConn"; access : "amqAccess"; reconnectionPolicy : "NoRetry"; initDelay : 10; } // JMSSource Operator with optional period and reconnectionPolicy specified stream <int32 id, rstring fname, rstring lname> MyPersonNamesStream = JMSSource() { param connection : "amqConn"; access : "amqAccess"; reconnectionPolicy : "InfiniteRetry"; period : 1.20; } // JMSSource operator with reconnectionPolicy specified as BoundedRetry stream <int32 id, rstring fname, rstring lname> MyPersonNamesStream = JMSSource() { param connection : "amqConn"; access : "amqAccess"; reconnectionPolicy : "BoundedRetry"; reconnectionBound : 2; period: 1.20; } }