What is WebSphere Message Broker



Comments



Description

What is WebSphere Message Broker [WMB] Message Broker (MB) introduction: Application Connectivity ================ Application connectivity is about providing a way for application programs to interconnect, and allow information to flow between them, without requiring the applications to be aware of the details of the connection. Basic connectivity is the starting point for any integration solution. It provides the transport on which information will flow. There are many characteristics that distinguish different transport options, but when integrating across heterogeneous environments and when dealing with applications that were not designed to intercommunicate, there are several mandatory functions needed for success: assured delivery (and persistence), once-only delivery, and asynchronous delivery. It is also essential that the transport be capable of delivering any type of data: Extensible Markup Language (XML), SOAP, and proprietary (when this makes the mostsense for a particular customer’s situation). These functions are delivered through WebSphere MQ, the defacto standard for messaging connectivity. WebSphere MQ can provide all an application needs provided the number of applications being interconnected is small, two or three for example. But as the number of applications being interconnected increases, additional application connectivity services are needed to implement a more efficient and effective solution. Message Brokering ============ When you are working in a large environment, message brokering functions are required. Fundamentally, message brokers are used to centralize routing and transformation functions, and these functions are essentially handled by a message flow. A message flow is a sequence of operations performed on a message by a series of message processing nodes. The actions are defined in terms of the message format, its content, and the results of individual actions along the message flow. Notice, however, that the flow is, as was the case with basic messaging, simply an extension of the path from the source application to the destination application. In other words, it is assumed that the destination wants, expects, and will handle all messages sent to it. Basically, the Message Broker is a WebSphere MQ application that routes and transforms messages. The WebSphere Message Broker consists of four components (Toolkit, configuration manager, broker, and User Name Server) that communicate with each other using WebSphere MQ messages. The format of this information is XML. Message Broker ToolKit =============== The WebSphere Message Brokers Toolkit is an integrated development environment (IDE) and graphical user interface (GUI) based on the open source Eclipse platform. Application developers work in separate instances of the Message Brokers Toolkit (also known as workbenches) to develop message sets and message flows. Tasks that can be performed using ToolKit • Definition of message flows • Definition and import of message definitions • Deployment of message flows and message sets to brokers • Control of log entries written during deploy • Start, stop, and trace of message flows running in brokers • Registering brokers in the configuration domai • Viewing and deleting subscriptions for publish/subscribe • Setting topic-based access control for publish/subscribe Broker ==== A broker is a system service on Windows platforms, a daemon process on UNIX platforms, or a started task on z/OS platforms. It controls processes that run message flows. Applications often send messages to the broker using WebSphere MQ queues and connections. The broker routes each message using the rules defined in message flows and message sets, which also transforms the data into the structure required by the receiving applications. Broker Domains ========== A broker domain is one or more brokers that share a common configuration, together with the single configuration manager that controls them. The configuration manager maintains all configuration details about the brokers in its domain within its internal configuration repository. Configuration Manager =============== The configuration manager functions as the interface between toolkit instances, its internal configuration repository, and a set of brokers executing message flows. The configuration manager provides brokers with their initial configuration, and updates them with any subsequent changes. It maintains the broker domain configuration. The configuration manager is the central runtime component that manages the components and resources that constitute the broker domain. Administrators typically install, create, and start a configuration manager for each broker domain. User name server =========== The User Name Server is an optional component, needed only when topic-based access control for publish/subscribe is desired or required. Message Flows ========== A message flow is really nothing more than a program created using graphical tools. The toolkit component provides both the environment and tools to accomplish this task. Installing WebSphere Message Broker v6 Installing the Binaries As a first step download the trail version of the message broker binaries from IBM site and install them. this part is very simple and process is depends on your operating system. Like for windows, you have .exe file and Linux has rpm and unix you get pkg or other. After installation Set up a broker database [Windows] __ 1. Create the broker database, BRKDB. Open a WebSphere Message Broker Command Console: mqsicreatedb BRKDB This command also establishes the required ODBC connection. __ 2. Verify your user account for the broker database. [Linux] If you are creating Oracle databases for 32-bit brokers on Linux® and UNIX® systems, run the mqsi_setupdatabase command before you create a database. mqsi_setupdatabase– Database–Database_Home_Directory Eg:mqsi_setupdatabase oracle /oracle/product/9i/Db_1 Add $ORACLE_HOME/lib to the end of the MQSI_LIBPATH library search path environment variable Connecting to a database from Linux/Unix - Copy the odbc32.ini sample file that is supplied in the install_dir/ODBC32/V5.3 directory to a location of your choice; for example, copy the file to your user ID’s home directory. - Ensure that the odbc32.ini file has file ownership of mqm:mqbrkrs, and has the same permissions as the supplied odbc32.ini sample file. - Set the ODBCINI32 environment variable to point to your odbc32.ini file, specifying a full path and file name. For Linux on x86 only, use the ODBCINI environment variable. On AIX®, HP-UX, Solaris on SPARC, and Linux on x86-64, set the 32-bit library search path environment variable MQSI_LIBPATH32 to show the location of the 32-bit libraries for the database manager that you are using. For example, on AIX: export MQSI_LIBPATH32=$MQSI_LIBPATH32:DB2_instance_directory/sqllib/lib32 On Linux on x86 only, set the 32-bit library search path LD_LIBRARY_PATH to show the location of the 32-bit libraries for the database manager. - Edit the final stanza in the odbc32.ini file (the [ODBC] stanza) to specify the location of the ODBC Driver Manager, and to control tracing. # In InstallDir, add the WebSphere Message Broker installation location to complete the fully qualified path to the ODBC directory. If you do not set this value correctly, the ODBC definition will not work. # In Trace, set the value to 0; if your IBM service representative asks you to enable ODBC trace, set the value to 1. # Start of changeIn TraceOptions, set the value to 3.End of change # In TraceFile, type the fully-qualified path and file name to which the ODBC trace is written. Trace files can become large; specify a directory with plenty of free disk space. # In TraceDll, add the WebSphere Message Broker installation location to complete the fully qualified path to the ODBC trace DLL. # Accept the default values that are shown in the sample odbc32.ini file for all the other entries in the stanza. ;######################################### ;###### Mandatory information stanza ##### ;######################################### [ODBC] ;# To turn on ODBC trace set Trace=1 Trace=0 TraceOptions=3 TraceFile=<A Directory with plenty of free space to hold trace ouput>/odbctrace32.out TraceDll=<Your Broker install directory>/ODBC32/V5.3/lib/odbctrac.so InstallDir=<Your Broker install directory>/ODBC32/V5.3 UseCursorLib=0 IANAAppCodePage=4 UNICODE=UTF-8 - Edit the first stanza in the odbc32.ini file (the [ODBC Data Sources] stanza) to list the DSN of each database. ;########################################## ;###### List of data sources stanza ####### ;########################################## [ODBC Data Sources] DB2V8DB=IBM DB2 Version 8 ODBC Driver DB2V9DB=IBM DB2 Version 9 ODBC Driver ORACLEDB=DataDirect 5.3 Oracle Driver ORACLERACDB=DataDirect 5.3 Oracle Driver (Real Application Clusters) SYBASEDB=DataDirect 5.3 Sybase Wire Protocol SYBASEDBUTF8=DataDirect 5.3 Sybase UTF8 Wire Protocol SQLSERVERDB=DataDirect 5.3 SQL Server Wire Protocol INFORMIXDB=IBM Informix ODBC Driver - For each database that you listed in the [ODBC Data Sources] stanza, create a stanza in the odbc32.ini file after the [ODBC Data Sources] stanza. The entries in the stanza depend on the database manager. 1. In Driver, add the WebSphere Message Broker installation location to complete the fully qualified path to the driver that is shown in the sample odbc32.ini file. 2. In Description, type a meaningful description of the database. This field is for information only, and does not affect the connection. 3. In ServerName, type the Oracle Service Name or Connect Descriptor that resolves to the target Oracle database; for example, through a mapping in the TSNAMES.ORA file. 4. Accept the default values that are shown in the sample odbc32.ini file for all the other entries in the stanza. For example: Example: ;# Oracle stanza [ORACLEDB] Driver=<Your Broker install directory>/ODBC32/V5.3/lib/UKor823.so Description=DataDirect 5.3 Oracle Driver EnableDescribeParam=1 OptimizePrepare=1 ServerName=<Your Oracle Net Service name> WorkArounds=536870912 ProcedureRetResults=1 ColumnSizeAsCharacter=1 - Ensure that you have edited all three parts of the odbc32.ini file: * The [ODBC Data Source] stanza at the top of the odbc32.ini file. * A stanza for each data source. * The [ODBC] stanza at the end of the odbc32.ini file. If you do not configure all three parts correctly, the ODBC DSNs are not valid, and the broker cannot connect to the database. Create and set up IBM WebSphere MQ v6 queue managers Create queue manager JO, with a dead letter queue. __ 1. Click Start –> Programs –> IBM WebSphere MQ –> WebSphere MQ Explorer. __ 2. Right-click Queue Managers –> New –> Queue Manager. __ a. Name = JO __ b. Dead letter queue = JO.DLQ, click Next __ c. For step two and step three, make no entries, simply click Next __ d. On step four, uncheck Create Listener configured for TCP/IP If you do not explicitly create the queue manager, the first mqsicreate<component> command will automatically create the queue manager that you specify in the command. However, many pertinent queue manager parameters will be missing, for instance: • A dead letter queue is not assigned. • A listener is not activated. • The queue manager will not start automatically. • The queue manager will not be the default. Should your pertinent queue manager parameters be missing, open the IBM WebSphere MQ Explorer (if not already open): i. Right-click the top-level element in the Navigator view (that is, IBM WebSphere MQ) and select Properties. To make your Queue Manager the default, on the General page, type the name of your newly created Queue Manager in the space labeled Default queue manager name. Click Apply; click OK. ii. From the Navigator view, right-click your new queue manager and select Properties. iii. On the General page, select Automatic from the Startup pulldown menu. set the Type to Automatic. iv. On the TCP page, set the TCP Port to 1414. v. Exit the Properties pages by clicking OK. vi. From the Navigator view, expand the Advanced options for your queue manager and select Listeners. vii. Right-click and select New –> TCP Listener. viii.A wizard starts, first asking you to name your listener; supply the name JO.LISTENER; click Next. ix. On the General page, change Port to 1414; click Finish. __e. From the Navigator view, right-click the Queues folder; right-click Select New –> Local Queue Name = JO.DLQ. Select Finish. __ 3. Verify results by examining the state of the queue manager in the WebSphere MQ Explorer. __ 4. Repeat these steps for the broker queue manager, JO.B with dead letter queue JO.B.DLQ, listener JO.B.LISTENER, and whose listener is to use port 1415. Remember that queue manager JO.B will not be the default queue manager. __ 5. A queue manager cluster will assist greatly in communications between the configuration manager’s queue manager and the broker’s queue manager. Name your cluster MQSI, establish the required cluster channels and make each queue manager a cluster repository. __ 6. Verify results by examining the state of each queue manager in the WebSphere MQ Explorer. Create a broker, a configuration manager and a user name server __ 1. Start up the Command Console. Start –> Programs –> IBM WebSphere Message __ 2. Select Brokers V6.0 –> Command Console. __ 3. Create (with the mqsicreateusernameserver command) a User Name Server on queue manager JO using service-Id jpaturi: Note: In this and subsequent commands you are asked to enter your password (jpaturi) as the value for the -a flag. If you wish to see how password prompting works, specify -a without a value. =>mqsicreateusernameserver -i jpaturi -a jpaturi -q JO Create (with the mqsicreateconfigmgr command) a configuration manager on queue manager JO using service-Id jpaturi. With IBM WebSphere Message Broker V6 it is also possible to name a configuration manager. Name yours JO-CM. Link the User Name Server to the configuration manager as well. =>mqsicreateconfigmgr JO-CM -i jpaturi -a jpaturi -q JO -s JO __ 4. Create (with the mqsicreatebroker command) a broker (JO-BRK) on queue manager JO.B using service-Id jpaturi and broker database BRKDB. Ensure the broker can connect to the User Name Server, on queue manager JO. =>mqsicreatebroker JO-BRK -i jpaturi -a jpaturi -q JO.B -n BRKDB -s JO -j The -j parameter assures publish/subscribe access is enabled for the broker. __ 5. Modify (reduce) broker properties -g (ConfigurationTimeout) and -k (ConfigurationDelayTimeout). The default values (300 and 60 seconds) are much too long for a local development environment. =>mqsichangebroker JO-BRK -g 60 -k 15 Verify setup and start components __ 1. Using the Command Console, list local components and verify content: =>mqsilist mqsiservice JOCM mqsiservice JOBRK mqsiservice UserNameServer __ 2. Start services for WebSphere Message Broker; enter: =>mqsistart JOBRK =>mqsistart JOCM =>mqsistart UserNameServer It is also possible to manually start the components from the Windows Services GUI. The GUI also permits the startup property to be set to Automatic. __ a. Click Start –> Settings –> Control Panel –> Administrative Tools –> Services. __ b. Right-click IBM WebSphere Message Broker component <name> and select Properties –> Startup type. __ c. Set the Start Type to Automatic. __ d. Click the Start button. __ e. Click OK. __ f. Repeat these steps for each component. __ 3. Verify service startup by examining the local error log using the Windows Event Viewer: Start –> Settings –> Control Panel –> Administrative Tools –> Event Viewer. Refresh the Application Log view and examine the most recent entries. Entries from the WebSphere Message Broker are identified in the Source column with the string WebSphere Broker v6. Setting up WebSphere Message Broker environment => Setting up the command environment After you have installed the product on any of the distributed systems, you must initialize the environment before you can use any runtime component or command. When you start a runtime component on Linux and UNIX systems, it inherits the environment from where you issue the mqsistart command. You must therefore initialize the environment before you start a component; the command mqsiprofile located in the directory install_dir/bin, performs this initialization. You must not change the location of the mqsiprofile command, or make user modifications to the command, because it might be replaced if you install service, or an update, to the product. If you want to run your own additional environment settings, add a script called your_file_name.sh to the broker’s work_path directory which contains the: /common/profiles subdirectory. When you run mqsiprofile again, the command automatically calls the additional user-written scripts in this location. The newly added script will not be picked up if you run an mqsistart command from an existing initialized command shell. work_path identifies the broker’s working directory; if you are unsure of the broker’s work path, enter the following command: echo $MQSI_WORKPATH -> Issue the mqsiprofile command: . install_dir/bin/mqsiprofile You must include the period and space preceding the location for this invocation to work correctly. Add this command to your login profile if you want it to be run at the start of every session. This command accesses additional scripts that you have copied to the common/profiles directory, therefore the environment is initialized for runtime components and other resources such as databases. -> Start the components that you want to run on this system using the mqsistart command. =>Running database setup scripts A broker requires access to a database to maintain operational and state data, and might also require access to user databases from deployed message flows. When you install a database product on Linux and UNIX systems, some database managers provide a profile to perform the environment set up that the database requires, or provide details of actions that you must take in their documentation. # If you can update the profile (mqsiprofile script) to provide permanent values for the details that are required (for example, the database server name or the installation directory): 1. Complete the changes to the profile. 2. Copy the profile file to the directory work_path\common\profiles. # If you cannot update the profile permanently, but need to make changes each time, you must run it independently of the mqsiprofile command: Run the appropriate profiles to initialize the environment for the database: DB2: . db2_instance_directory/sqllib/db2profile Oracle: . ${ORACLE_HOME}/bin/oraenv Note: If you have installed 64-bit instances of DB2 or 64-bit Oracle databases, you need to complete additional setup steps, including adding 32-bit libraries to the LIBPATH. Applying maintenance to WebSphere Message Broker Best Practise: Before you apply service to any component, check that you have backed up any associated resources, including the database used by any brokers on this computer. You might also choose to back up installation and work path directories. Note: You can download maintenance updates for WebSphere Message Broker from a Web site, in the form of a Program Temporary Fix (PTF), also known as a fix pack. Fix packs are cumulative, therefore, if multiple fix packs are available, you do not have to install a previous fix pack before you install the latest available. However, you must first install the GA code to ensure that you comply with your license agreement. choosing how to apply service: Method#1: Apply service to an existing installation. When you apply the fix pack, the new level of the product overwrites the existing level. You must stop all components before you apply service. All the components and resources that you have defined are retained. When the fix pack is successfully installed, restart the components. Method#2: Install the fix pack level of the product at a new location. Fix packs are supplied as complete installations. You can install the product in a new location on your computer by using the fix pack packages. You can do this only within the terms of your license: * You must have installed a GA level of the product on this computer. * You must conform to the any license restrictions for the number of installations on a single computer; your license might permit you to install more than one copy of the product, but allow you to run only one installation at a time. This option provides several advantages: * You do not have to stop components to complete the installation. * You can choose which component runs at which service level by running the appropriate mqsiprofile before you start the component. * You can back out a component to the previous service level by using the mqsiprofile from the older code level and restarting the component. Installing/Applying service on Linux and UNIX #1: On AIX, you must log in as root. On Linux and on other UNIX computers, your user ID must have root authority to complete installation. #2: Stop all components that are running on this computer by using the mqsistop command. Ensure that you do not have any WebSphere Message Broker files open. #3: Change to the directory where you downloaded the fix pack file. The file name is in the form V.R.M-prod-platform-fixpack.tar.z, where V.R.M-prod represents the version, release, and modification level of the product, -platform identifies the platform, and -fixpack identifies the fix pack. #4: Uncompress the .z file uncompress -fv V.R.M-prod-platform-fixpack.tar.z #5: Untar the image and extract all the directories, subdirectories, and files required to apply the update. tar -xvf V.R.M-prod-platform-fixpack.tar #6: Decide which interface you want to use for the installation; -graphical (the default option if none is specified), -console, or -silent. # To start the installation wizard in graphical mode, type the installer name with no options at a command prompt, and press Enter. When you invoke the installation wizard, it guides you through a series of panels where you can make choices about where to install the components, and which components you want to install. # To start the installation wizard in console mode, enter installer -console. When you invoke the installation wizard, it prompts you to enter input for all options, including where to install the components, and which components you want to install. # To use the installation wizard silent interface, enter installer -silent.To start the installation wizard in silent mode, enter installer -silent. If you want to specify non-default settings, include a response file on the invocation. #7: When installation has successfully completed, review the release notes that are supplied in the directory readmes, and complete any manual post-installation tasks that are required. Tip: If you have defined ODBC connections for brokers on this computer, check the sample odbc.ini files and make any required changes before you restart your brokers. #8: restart the components by using the mqsistart command Response files for WMB installation If you want to install or uninstall in silent mode and you want to use values other than the defaults, you can pass a response file to the program. A response file is a text file that contains options that define the choices that the wizard makes. using Response Files, you can: * Specify a non-default installation location * Choose a custom installation (typical is the default) (runtime components only) * Choose which components to install (runtime components only) * Specify if the program is to check for prerequisite software (runtime components only) Sample response files Sample response files are supplied with WebSphere Message Broker. Use these response files when install/uninstalling the product. The sample response file includes detailed information about the options that you can change, and the values you must enter to change them. You can tailor this file to your requirements. The sample response files are located in the sample_scripts directory of root directory. Generating response files Use the following command to generate a template installation response file without installation being performed: installer -options-template responsefile The generated template response file contains full instructions on how to edit it to specify your required options. Installation is not performed. You can edit the file to change the options to define the operation that you want to be performed. Recording a response file Use the following command to record a response file during installation: installer -options-record responsefile The installation wizard starts in graphical mode, and requires your input as it progresses. Your responses are recorded during installation. When installation is complete, the response file contains all the choices you have made during installation. If you want to record a response file during a console mode installation, use the following command: installer -options-record responsefile -console Calling response files in commands To run a program specifying the silent options and the response file that you want to use, use the following command: installer -options responsefile -silent The program runs without interaction according to the options selected when you recorded the response file. Note: Substitute the installer with the appropriate name Platform Installation program -------------------------------------AIX setupaix HP-UX on Itanium setuphpia64 HP-UX on PA-RISC setuphp Linux on POWER setuplinuxppc Linux on x86 setuplinuxia32 Linux on System z setuplinux390 Solaris on SPARC setupsolaris Solaris on x86-64 setupsolarisx64 Working with WebSphere Message Broker Toolkit Note: i’m writing this, assuming that you’d already setup the message broker environment and installed toolkit. If not, please refer to the old posts on message broker on this blog, to know how to do it. Now, we have Websphere message broker installed and the environment is setup. we created a broker, configuration manager and user name server. Also installed Message broker toolkit. Now we want to know, what as an administrator can we do from Message broker toolkit. yes, as you might have read or know, Message broker toolkit [will referred as toolkit in this article] has 2 prespectives. 1. Development prespective For developing, editing and changing message flows and message sets. 2. Administration prespective. for administration of brokers, domains etc.. for this tutorial, we work in the administration prespective. From the toolkit menu bar Click Window –> Open Perspective –> Broker Administration create a broker domain 1. for this first, Create a connection to the configuration manager created earlier. In the Broker Administration Navigator view, right-click in the Domain area and select New –> Domain 2. now the wizard will as you for some inputs.Give them, reffering to the configiuration manager. Queue Manager name, Host, Port etc 3. Now give server project name and Connection name. your connection name appears in toolkit as ‘choosen_name.configmgr’ 4. You may be asked Do you want to create a new Server project with the name xyz, click Yes 5. click Finish. Connecting to broker domain 1. In the tooklit, under domains…select the domain which you creatd above. 2. Verify, wether it is in connected state or not connected 3. If not connected Right click on the broker domain connection entry and select connect from the drop down list. 4. Once the connection was made, you can see the status changing to ‘connected’ Now, you’ve defined a new broker domain and connected successfully to it. The next step is to get the brokers under it. Registering Brokers In this step, we register the broker with the configuration manager 1. Right click on the domain connection entry and select broker–>new note: even though it is shown as ‘new’, we are not creating new broker but just connecting existing broker to this domain. 2. Now, enter the dialog boxes that appers Broker name, Broker Queue Manager name, 3. Select Finish and in the next window select either Delta or Complete deploy. 4. Verify the deploy log. [double click the event log under domains view] 5. Once it is Finished, you can see, your broker under the broker topology. also if you have any execution groups which were already defined in broker, they will be shown under the broker. Now we have broker domains and a broker inside it. Let us try deploying an broker archive. Deploying a Message flow with a BAR file 1. Expand the ‘broker archive’ in the broker administration prespective of the toolkit 2. Import the broker archive [.bar] file using menu ->file Import ->filesystem 3. Once the file was located, browse and select the server project [which you specified while creating broker domain] 4. Click OK and Finish 5. Now, your BAR file appear under server project. 6. Now right click on the BAR file and select deploy file. 7. Select the target [execution group] and finish Once successfully deployed, you can see under the ‘execution group’ which was under broker. You can also verify the event log, through out this process. Now, you have a Broker domain -> A broker ->execution group ->a Message flow. Voila, we are done with this tutoria Backup and Restore WebSphere Message Broker domain Back up the domain 1. Before taking the back up of the domain, you need to stop the config manager and broker. mqsistop Config_Mnager mqsistop Broker mqsistop UserName_Server 2. Back up the configuration manager mqsibackupconfigmgr Config_Manager -d Backup_direcotry BIP1075I: Creating backup archive for Configuration Manager ‘Config_Manager’ in directory ‘xyz’ … BIP1017I: A backup archive called ‘Config_Manager_100507_002836.zip’ was created successfully. BIP8071I: Successful command completion. 3. service.properties file to the backup directory. This is necessary if you want to backup and restore the actual configuration manager repository. It must be kept with the zip file you have created. 4. Back up the broker database also with the help of DBA Restoring the domain: Lets just imagine that you’ve deleted the config manager. 1. Now create the config manager with same name mqsicreateconfigmgr Config_Manager -i username -a password -q QM_name -w PATH 2. Now, run the restore command mqsirestoreconfigmgr Config_Manager -d backup_directory -a backup_file_name -w PATH 3. After the restore is completed, Start the config manager and broker. mqsistart Config_Manager mqsistart Broker 4. Verify, whether the domain is properly restored by going to the Message Brokers Toolkit, connecting to the domain and attempting to stop and then start one of the message flows. Be sure to check you Event Log to ensure everything worked properly WebSphere Message Broker (WMB) Nodes Message broker nodes are used in Message flows. A message flow node is a processing step in a message flow. A message flow node receives a message, performs a set of actions against the message, and optionally passes the message on to the next node in the message flow. A message flow node can be a built-in node, a user-defined node, or a subflow node. A built-in node is a message flow node that is supplied by WebSphere Message Broker. The built-in nodes provide input and output, manipulation and transformation, decision making, collating requests, and error handling and reporting functions. A user-defined node is an extension to the broker that provides a new message flow node in addition to those supplied with the product. It must be written to the user-defined node API provided by WebSphere Message Broker for both C and Java languages. A subflow is a directed graph that is composed of message flow nodes and connectors and is designed to be embedded in a message flow or in another subflow. A subflow must include at least one Input node or one Output node. A subflow can be executed by a broker only as part of the message flow in which it is embedded, and therefore cannot be independently deployed. A message flow node has a fixed number of input and output points known as terminals. You can make connections between the terminals to define the routes that a message can take through a message flow. Input and output nodes define points in the message flow to which client applications send messages, and from which client applications receive messages.Client applications interact with these nodes by putting messages to, or getting messages from, the I/O resource that is specified by the node as the source or target of the messages. Although a message flow must include at least one input node, it does not need to include an output node. Overview of all the nodes available in WMB v6.0, 6.1 and 7.0 Input Nodes: MQInput Use an MQInput node if the messages arrive at the broker on a WebSphere MQ queue, and the node is to be at the start of a message flow. MQGet Use an MQGet node if the messages arrive at the broker on a WebSphere MQ queue and the node is not to be at the start of a message flow. SCADAInput Use a SCADAInput node if the messages are sent by a telemetry device. HTTPInput Use an HTTPInput node if the messages are sent by a Web services client. Real-timeInput or Real-timeOptimizedFlow Use one of these nodes if the messages are sent by a JMS or multicast application. The RealtimeInput node is an input node and the Real-timeOptimizedFlow node is a complete message flow that provides a high performance publish/subscribe message flow. JMSInput Use a JMSInput node if the messages are sent by a JMS application. User-defined input node Use a user-defined input node if the message source is a client or application that uses a different protocol or transport. Input node If you are creating a message flow that you want to embed in another message flow (a subflow) that you will not deploy as a stand-alone message flow, you must include at least one Input node to receive messages into the subflow. Output Nodes: Publication Use a Publication node to distribute the messages using the publish/subscribe network for applications that subscribe to the broker across all supported protocols. MQOutput Use an MQOutput node if the target application expects to receive messages on a WebSphere MQ queue, or on the WebSphere MQ reply-to queue that is specified in the input message MQMD MQReply Use an MQReply node if the target application expects to receive messages on the WebSphere MQ reply-to queue that is specified in the input message MQMD. SCADAOutput Use a SCADAOutput node if a telemetry device is the target of the output messages, and the Publication node is not suitable. HTTPReply Use an HTTPReply node if the messages are in response to a Web services client request. HTTPRequest Use an HTTPRequest node if your message flow interacts with a Web service. Real-timeOptimizedFlow Use a Real-timeOptimizedFlow node if the target application is a JMS or multicast application. JMSOutput Use a JMSOutput node if the messages are for a JMS destination. User-defined output node Use a user-defined output node if the target is a client or application that uses a different protocol or transport. Output node If you are creating a message flow that you want to embed in another message flow (a subflow) that you will not deploy as a stand-alone message flow, you must include at least one Output node to propagate messages to subsequent nodes that you connect to the subflow. Nodes for manipulating, enhancing, and transforming messages Compute Use the Compute node to: * Manipulate message content * Transform the message in some way * Interact with a database to modify the content of the message or the database and pass on one or more new messages JavaCompute Use the JavaCompute node to: * Examine an incoming message and, depending on its content, propagate it unchanged to one of the node’s two output terminals. The node behaves in a similar way to a Filter node, but uses Java™ instead of ESQL to decide which output terminal to use. * Change part of an incoming message and propagate the changed message to one of the output terminals. * Create and build a new output message that is totally independent of the input message. Mapping Use the Mapping node to create a new message from the input message by mapping the content of elements of the output message from elements of the input message, or from database content. You can also extract parts of the message, and optionally change their content, to create a new output message that is a partial copy of the message that is received by the node. Database Use the Database node to interact with a database that is identified by the node properties. The Database node handles both predefined and self-defining messages. DataDelete, DataInsert, DataUpdate The DataDelete, DataInsert, and DataUpdate nodes are specialized forms of the Database node that provide a single mode of interaction (deletion of one or more rows, insertion of one or more rows, or update of one or more existing rows). Warehouse The Warehouse node provides a store interface that you can use to store all or part of the message in a database XMLTransformation Use the XMLTransformation node to transform an input XML message into another format using XSLT style sheets. It, can perform the following actions: * Sort the data * Select data elements to include or exclude based on some criteria * Transform the data into another format JMSMQTransform Use the JMSMQTransform node to transform a message with a JMS message tree into a message that has a tree structure that is compatible with the format of messages that are produced by the WebSphere MQ JMS provider. MQJMSTransform Use the MQJMSTransform node to receive messages that have a WebSphere MQ JMS provider message tree format, and transform them into a format that is compatible with messages that are to be sent to JMS destinations. MQOptimizedFlow Use the MQOptimizedFlow node to replace a publish/subscribe message flow that consists of an MQInput node connected to a Publication node, and that uses the JMS over WebSphere MQ transport. User-defined Use a user-defined node to handle specific requirements that are not met by the built-in nodes. Decision making nodes Validate Use the Validate node to check that the message that arrives on its input terminal is as expected. Filter Use the Filter node with an ESQL statement to determine the next node to which the message is sent by this node. FlowOrder You can connect the terminals of this node to force the message to be processed by one sequence of nodes, followed by a second sequence of nodes. Passthrough Use the Passthrough node to enable version control of a subflow at run time. Use this node to add a label to your subflow. RouteToLabel and Label Use the RouteToLabel node following a Compute node for complex routing. Define a list of destinations in a Compute node that are acted on by the RouteToLabel node, which interrogates the destinations and passes the message on to the corresponding Label node. ResetContentDescriptor Use the ResetContentDescriptor node to set new message properties that are used when the message bit stream is next parsed by a subsequent node in the message flow. Nodes for controlling time-sensitive operations TimeoutControl Use a TimeoutControl node and a TimeoutNotification node together in a message flow to control events that occur at a specific time or at defined time intervals. The TimeoutControl node receives an input message that contains a timeout request. All or part of this input message is validated and stored to be propagated by an associated TimeoutNotification node in the message flow. The input message is also propagated unchanged to the next node in the message flow. TimeoutNotification Use a stand-alone TimeoutNotification node to generate messages that are propagated at configured times or time intervals to the next node in the message flow for further processing. Nodes for collating requests Use the AggregateControl, AggregateReply, and AggregateRequest nodes to collate related requests and responses. Use these nodes to generate several requests in response to one input message, to control and coordinate the responses that are received in response to those requests, and to combine the information that is provided by the responses to continue processing. Error handling and reporting nodes Trace Include a Trace node to generate one or more trace entries to record what is happening in the message flow at this point. TryCatch Include a TryCatch node to control the error processing when exceptions are thrown. Throw Include a Throw node to force an exception to be thrown, and specify the identity of the exception, to make it easier to diagnose the problem. New nodes in v6.1 File and FTP nodes FileInput node reads files from the local file system or FTP server FileOutput node writes files to the local file system or FTP server Route, database route nodes: The new Route node provides a graphical technique to enable incoming requests to be examined, and flow sent down the appropriate part of the message flow, depending on the specified criteria. The DatabaseRoute node provides a similar function to the Route node, but the routing decision is based on the contents of a relational database. DatabaseRetrieve node enables data to be retrieved from one of more relational databases, and use a similar dialogue to the DatabaseRoute node. New nodes in V7 V7 introduced new nodes for SCA (service component architecture). These are nodes are basically for use with websphere process server which uses SCA. SCA Input Node: A WebSphere Process Server SCA Import component can use Message Broker as an SCA endpoint. The message received by the broker can be a SOAP over HTTP message or an MQ message on a queue, depending on the binding used by the node. SCA Reply Node: This allows a response message to be sent from the broker back to the originating Process Server SCA client, in response to a prior message received by an SCA Input Node. SCA Request Node: This allows synchronous requests to be made from the broker, allowing the broker to participate in synchronous message exchange patterns with a Process Server SCA export component. The message sent by the broker can be a SOAP message over HTTP, or an MQ message, depending on the binding used by the node. The node will perform a blocked wait for a specified time period until a response is received WebSphere Message Broker (WMB) Quick reference guide A quick reference for all WMB commands to perform day-to-day activities like create, modify, delete different components of message broker [brokers, configuration manager, usernameserver, execution groups, security, deployment and db] Settings up Command environment: Run mqsiprofile script Running Commands: Commands must be lower case Component names case sensitive Start/Stop/Delete Broker: Start: mqsistart BrokerName Stop: mqsistop BrokerName –q after name stops associated queue manager –i after name stops immediately Delete: mqsideletebroker BrokerName [options] Note: Broker must be stopped before it can be deleted Start/Stop/Delete Configuration Manager: Start: mqsistart ConfigMgrName Stop: mqsistop ConfigMgrName –q after name stops associated queue manager Delete: mqsideleteconfigmgr [ConfigMgrName] [options] –n flag to delete configuration repository -w flag deletes all files in the configuration manager’s work path Start/Stop/Delete UserNameServer: Start: mqsistart UserNameServer Stop: mqsistop UserNameServer –q after name stops associated queue manager Delete: mqsideleteusernameserver [options] –q after name deletes associated queue manager –w after name deletes all files in the work path associated with the User Name Server Specifying Username and password: You can specify the following flags along with the commands –i userid –a password If you leave, -a flag black; it will prompt you for password. Changing Broker mqsichangebroker BrokerName [options] -s — User Name Server queue manager name -j — Enable publish/subscribe for the broker -d — Disable publish/subscribe for the broker -t — Run the broker as a trusted MQ application -n — Stop running the broker as a trusted MQ application -g — Configuration timeout — maximum time for response from an execution group -k — Configuration delay timeout — maximum time for response from a broker Changing Configuration Manager mqsichangeconfigmgr [ConfigMgrName] [options] -s — User Name Server queue manager name -j — Maximum Java virtual machine heap size in megabytes. The default is 128. Changing User name server mqsichangeusernameserver [options] -r — Refresh interval being the amount of time before the User Name Server interrogates the security subsystem for changes to users or groups -g — The name of the authentication data source -j — Indicates use of a data source containing users and group information instead of using the operating system -o — Indicates use of the operating system users and group information Note: before executing above change commands, the respective component must be stopped. Execution Groups: Create: mqsicreatexecutiongroup [options] Delete: mqsideleteexecutiongroup [options] -i host -p port number of the Configuration Manager-q Config Manager QM -q queue manager of Configuration Manager -b Broker name –e Execution group name -w timeout - v tracefile name Start: mqsistartmsgflow [options] Stop: mqsistopmsgflow[options] -i host -p port number of the Configuration Manager-q Config Manager QM -q queue manager of Configuration Manager -b Broker name –e Execution group name -m specific flow within the execution group -w timeout - v tracefile name Report message flow statistics: mqsireportflowstats broker_name [options] -e ExecutionGroupName -f MessageFlow -a Specify that the command modifies archive accounting and statistics collection. -s Specify that the command modifies snapshot accounting and statistics collection. -g Specifies that the command applies to all execution groups that belong to the broker. -j Specifies that the command applies to all message flows that belong to the execution group. Change message flow statistics: mqsichangeflowstats [options] -e ExecutionGroupName -f MessageFlow -a Specify that the command modifies archive accounting and statistics collection. -s Specify that the command modifies snapshot accounting and statistics collection. -g Specifies that the command applies to all execution groups that belong to the broker. -j Specifies that the command applies to all message flows that belong to the execution group. -o OutputFormat; usertrace/xml Deploy: mqsideploy [options] -p port number of the Configuration Manager -q queue manager of Configuration Manager -b Broker -e Execution Group -a BAR file -w Timeout Listing resources mqsilist [options] - a List all the components - brokerName The name of the broker for which you want to list resources - e egName selects an execution group within a broker Security Commands Create ACL: mqsicreateaclentry ConfigmgrName [options] List ACL entries: mqsilistaclentries [options] Delete ACL entries: mqsideleteaclentries [options] -g GroupName The local group to which this entry refers -u UserName The user name to which this entry refers -m MachineName The name of the machine from which a specified user can connect. -a The specified user name can be on any machine. -x AccessLevel F: Full control D: Deploy E: Edit V: View -b Broker -e ExeGroup, You must specify the b flag if you specify this flag. -s Subscription The object is a subscription object, and its name is specified as a parameter. -r The object refers to the root topic. -t The object refers to the main topology. -p The object refers to the “allresources” resource type Backup/Restore Commands Backup: mqsibackupconfigmgr ConfigMgrName –d DirPath [options] Restore: mqsirestoreconfigmgr ConfigMgrName –d DirPath –a ArchiveName [options] -w WorkPath Specifies the path for the Configuration Manager repository Problem Determination Trace Report Trace: mqsireporttrace [options] Change Trace: mqsichangetrace [options] -componentName The name of a broker, a Configuration Manager, or the fixed name User Name Server; -e egName The label of the execution group for which a report is required. This option is valid only if you have specified a broker as the component. -f messageFlow The label of the message flow for which a report is required. This option is valid only if you have specified a broker as the component, and an execution group. -u Derive report information from the user trace. -t Derive report information from the service trace. -b Request a report for agent function. -n Report the setting of the Trace node switch. Read Trace: mqsireadlog BrkName [options] –o Output_file -e Egroup -o Outputfilename -f Read the log file directly from the file system -u Read the log contents from the user trace log. -t Read the log contents from the service trace log. Format Trace: mqsiformatlog –i input_file -o Output_file Publish/subscribe commands Add, remove, and list MQ publish/subscribe broker network Add: mqsijoinmqpubsub Broker_name [options] -p ParentQueueManagerName, The name of the queue manager that hosts the WebSphere MQ Publish/Subscribe broker to which this WebSphere Message Broker broker is to be joined Remove: mqsiclearmqpubsub Broker_name [options] -n NeighborQueueManagerName, The name of the queue manager that hosts the WebSphere MQ Publish/Subscribe broker for which the association as a neighbor is being removed. List: mqsilistmqpubsub Broker_name Database commands CreateDB: (windows) mqsicreatedb DBName [options] -i ServiceUserID, The user ID under which the DatabaseInstanceMgr service runs -a ServicePassword, The password for the ServiceUserID -p PortNumber, The TCP/IP port number that this component will use on the local machine -e DbType -u DbUserID, An additional user name that requires access to the database that is created by this command. (unix/Linux) mqsi_setupdatabase [options] -Database_Home_Directory, The name of the directory in which the database is (or will be) installed Change user ID andpassword information mqsisetdbparms BrokerName [options] -n ResourceName or AdapterName -u UserId or EISUserId -p Password -d This parameter deletes the user ID and password pair for this resource from the registry. -a Specify this parameter to process the mqsisetdbparms command when the broker itself is running
Copyright © 2024 DOKUMEN.SITE Inc.