IBMStreams com.ibm.streamsx.messaging Toolkit > com.ibm.streamsx.messaging 5.4.3 > Developing and running applications that use the Messaging Toolkit
To create applications that use the Messaging Toolkit, you must configure either Streams Studio or the SPL compiler to be aware of the location of the toolkit.
source product-installation-root-directory/4.0.0.0/bin/streamsprofile.sh
For Kafka and MQTT, the toolkit ships with a set of required clients, and therefore this configuration is not needed.
export STREAMS_MESSAGING_AMQ_HOME="/home/streamsuser/ApacheActiveMQ"
export STREAMS_MESSAGING_WMQ_HOME="/opt/mqm"
After the location of the toolkit is communicated to the compiler, the SPL artifacts that are specified in the toolkit can be used by an application. The application can include a use directive to bring the necessary namespaces into scope. Alternatively, you can fully qualify the operators that are provided by toolkit with their namespaces as prefixes.
export STREAMS_SPLPATH=$STREAMS_INSTALL/toolkits/com.ibm.streamsx.messaging
sc -t $STREAMS_INSTALL/toolkits/com.ibm.streamsx.messaging -M MyMainwhere MyMain is the name of the SPL main composite. Note: These command parameters override the STREAMS_SPLPATH environment variable.
use com.ibm.streamsx.messaging.jms::*; use com.ibm.streamsx.messaging.mqtt::*; use com.ibm.streamsx.messaging.xms::*; use com.ibm.streamsx.messaging.kafka::*;You can also specify a use clause for individual operators by replacing the asterisk (*) with the operator name. For example:
use com.ibm.streamsx.messaging.jms::JMSSink; use com.ibm.streamsx.messaging.mqtt::MQTTSink; use com.ibm.streamsx.messaging.xms::XMSSource; use com.ibm.streamsx.messaging.kafka::KafkaConsumer;