Date Created: Fri 05-Sep-2008

Related Document Categories:

Get my Message Broker course here >> http://www.themiddlewareshop.com/products/


    Steps for manually creating a simple broker domain

    This section gives instructions for creating the resources and components required for a simple broker domain.

    In the most basic broker domain configuration, the broker and the Configuration Manager share the same queue manager. This makes setting up WebSphere MQ simpler, as there is no requirement to create channels to handle communication between multiple queue managers. However, in a production environment it is recommended that each component has its own queue manager defined for performance reasons.

    Creating a Queue Manager
    We will create the queue manager using MQ Explorer.

































    Creating a Configuration Manager

    A queue manager has been created before the Configuration Manager in order to define a listener at the same time. Alternatively, the Configuration Manager
    could be created first and the listener added to the queue manager later.All WebSphere Message Broker commands that have the ‘mqsi’ prefix need to
    be run in the WebSphere Message Broker Command Console on Windows. This is a command prompt that has been configured with the required environment for
    WebSphere Message Broker and is configured by default on Windows



    On Windows, the WebSphere message broker command console is essentially a command prompt with appropriate path and environment variables set.



    mqsicreateconfigmgr CONFIG_MANAGER -i userid -a password -q queuemanagername

    The parameters required for the mqsicreateconfigmgr command are:
    -i is a user ID (which must have Administrator authority and be a member
    of the mqbrkrs security group).
    -a is the matching password.
    -q is the name of the queue manager, for example, broker1_queue_manager, which we created above with MQ Explorer

    If the queue manager specified with the -q parameter does not already exist, it is created by the mqsicreateconfigmgr command. When the command has
    completed. This is a useful option when wanting to simply the automation of creating a brokers using scripting.

    mqsicreateconfigmgr config_manager -i stever -a sowhatdoiwant -q broker1_queue_manager

    Note: Here is the complete syntax for the mqsicreateconfigmgr command.

    BIP8106W: Creates a Configuration Manager.

    Syntax:
    mqsicreateconfigmgr configMgrName -i serviceUserId -a servicePassword -q queueManagerName [-n db2DatabaseToMigrate -u migrationDatabaseUserId -p migrationDatabasePassword] [-s unsQMgrName] [-w workPath]

    Command Options
    'configMgrName' name of the Configuration Manager (may be omitted on Windows)
    '-i serviceUserId' the userid that the Configuration Manager will run under
    '-a servicePassword' the password for the Configuration Manager userid
    '-q queueManagerName' the WebSphere MQ queue manager that the Configuration Manager will use (this is created if it does not exist)
    '-n db2DatabaseToMigrate' the name of the DB2 database that contains existing domain data to migrate
    '-u migrationDatabaseUserId' the userid of the DB2 database being migrated
    '-p migrationDatabasePassword' the password of the DB2 database being migrated
    '-s unsQMgrName' the WebSphere MQ queue manager of the User Name Server
    '-w workPath' the directory into which trace logs and the Configuration Manager repository will be placed.

    Note: On Windows platforms, if the Configuration Manager name is omitted 'ConfigMgr' will be used.

    BIP8006E: Mandatory flag missing.
    When using this command interface the user should select all mandatory flags.
    Correct and reissue the command.




    You will notice many setmqaut commands, this the utility setting rights on appropriate objects.

    Creating a broker database

    The next step in creating the broker domain is to create a database for the broker. This database is used to store configuration data for the broker. The broker database can be created in any of the supported broker database types—DB2 Universal Database,Oracle, Sybase, and SQL Server.

    We are going to use DB2 Universal Database version 8.2

    mqsicreatedb BRKDB1 -i stever -a sowhatdoiwant -e DB2

    Note: Here is the complete syntax for the mqsicreatedb command.

    BIP9819I: Creates a database for use with a Broker

    Syntax:
    mqsicreatedb databaseName [-i serviceUserID] [-a servicePassword] [-w workpath] [-p portNumber] [-e dbType] [-u dbUserID]]
    Command Options:
    'databaseName' is the name of the database to be created
    Optional:
    '-i serviceUserID' the userid that the DatabaseInstanceMgr should run under.
    '-a servicePassword' the password for the DatabaseInstanceMgr userid.
    '-p portNumber' the port number the DatabaseInstanceMgr should use (default=1527)
    '-e dbType' the Database type to use, currently supported: 'DB2' or 'Derby'
    '-u dbUserID' (DB2 only) grant database access to this userID.

    BIP8007E: Mandatory argument missing.
    When using this command interface the user should supply the mandatory argument.
    Correct and reissue the command.




    As a result of the installation on windows an ODBC Connection is created to allow the broker to communicate with the newly created database (BRKDB1). Using the administration tool applet in settings-control-panel you can see the ODBC connection.






    Creating a broker

    When the broker database has been created, the mqsicreatebroker command can be run in the Command Console to create a new broker. The mqsicreatebroker command has similar syntax to the mqsicreateconfigmgr command. Use the instructions below to create a broker called BROKER1. In the Command Console type the following command: mqsicreatebroker BROKER1 -i userid -a password -q queuemanager -n dbname

    mqsicreatebroker broker1-i stever -a sowhatdoiwant -q broker1_queue_manager -n BRKDB1

    Note: Here is the complete syntax for the mqsicreatebroke command.

    BIP8105W: Creates a broker.

    Syntax:
    mqsicreatebroker brokerName -i serviceUserId -a servicePassword -q queueManagerName -n dataSourceName [-u dataSourceUserId] [-p dataSourcePassword] [-s unsQMgrName [-j]] [-g configurationTimeout] [-k configurationDelayTimeout] [-w workPath] [-l userLilPath] [-t] [-m] [-v statisticsMajorInterval] [-P httpListenerPort] [-c icuConverterPath] [-y ldapPrincipal -z ldapCredentials] [-x userExitPath]

    Command Options:
    'brokerName' name of the broker
    '-i serviceUserId' the userid that the broker will run under
    '-a servicePassword' the password for the broker userid
    '-q queueManagerName' the WebSphere MQ queue manager that the broker will use. This is created if it does not exist
    '-n dataSourceName' the broker's database name
    '-u dataSourceUserId' the userid that the broker uses to access its database
    '-p dataSourcePassword' the password for the broker's database userid
    '-s unsQMgrName' the WebSphere MQ queue manager of the User Name Server
    '-j' enables publish/subscribe access control for the broker
    '-g configurationTimeout' the maximum time (in seconds) to allow a broker to process a deployed message
    '-k configurationDelayTimeout' the maximum time (in seconds) to allow a broker to process a minimum size deployed message
    '-w workPath' the directory into which trace logs are placed
    '-l userLilPath' the directory from which the broker searches for user-supplied libraries
    '-t' enables WebSphere MQ fastpath for this broker
    '-m' indicates that migration is required from an WebSphere publish/subscribe broker
    '-v statisticsMajorInterval' the time (in minutes) for the duration of the interval for collecting statistics archive records
    '-P httpListenerPort' the port that the broker HTTP listener will use
    '-c icuConverterPath' delimited list (';' in windows, ':' on unix) of paths to search for ICU converters or converter packages.
    '-y ldapPrincipal' the LDAP Principal (userId)
    '-z ldapCredentials' the LDAP Credentials (password)
    '-x userExitPath' the directory from which the broker searches for all user exits. This path will be added to the system library search path (PATH,LIBPATH,LD_LIBRARY_PATH,SHLIBPATH) for the execution group process only.

    BIP8007E: Mandatory argument missing.
    When using this command interface the user should supply the mandatory argument.
    Correct and reissue the command.

    Starting the components

    When the broker and Configuration Manager have been successfully created they can be started. To check that the components were created successfully, type mqsilist in the Command Console. This displays a list of the components that have been created and the names of queue managers where appropriate.

    Sample output:

    BIP8099I: Broker: broker1 - broker1_queue_manager
    BIP8099I: ConfigMgr: config_manager - broker1_queue_manager
    BIP8099I: DbInstMgr: DatabaseInstanceMgr6 -

    BIP8071I: Successful command completion.

    Start the Configuration Manager by typing the mqsistart command in the Command Console followed by the Configuration Manager name, for example:
    mqsistart config_manager

    A BIP8096 success message should be displayed after the command has been run. Verify that the Configuration Manager has started successfully and is
    available for use by checking the WebSphere Broker messages in the Windows Event Viewer generated by the WebSphere Message Broker runtime.
    vary between different versions of Windows, but typically it can be launched from the Administrative Tools section of the Control Panel, or in the Computer Management tool found in the Control Panel.

    BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem.









    Start the broker by typing the mqsistart command into the Command Console followed by the broker name, for example: mqsistart broker1

    BIP8096I: Successful command initiation, check the system log to ensure that the component started without problem and that it continues to run without problem.




    The broker and Configuration Manager must be started in order to create a broker domain.

    Creating a domain connection

    This section assumes that the basic components of a broker domain, a Configuration Manager, and a broker have been created and are started on the
    system.

    The domain connection is the reference to a broker domain in the Message Brokers Toolkit. Multiple broker domains can be defined in the Message Brokers
    Toolkit with connections to both local and remote Configuration Managers.The following instructions demonstrate how to create a domain connection for a
    local Configuration Manager, but the same method can be used to create a domain connection for a remote Configuration Manager.

    Use the instructions below to create a domain connection:

    1. Launch the Message Brokers Toolkit.








    2. Change to the Broker Administration perspective by clicking Window →Open Perspective → Broker Administration perspective.



    3. From the File menu, select New → Domain. This opens the Create a Domain Connection dialog. Or use right mouse click in the Broker Administration Navigator as shown.



    4. Enter the name of the Configuration Manager’s queue manager, for example, broker1_queue_manager , in the Queue Manager Name field.

    5. Change the port number to reflect the port that the queue manager’s listener is configured on, for example, 4444.



    6. Click Next.

    At this point the Message Brokers Toolkit attempts to establish communication to the Configuration Manager. A status bar is displayed at the bottom of the wizard
    to show the progress






    You can see the new domain that we have created is showing in the domains view.



    You can also use window > show view > other > domains to sow the domains view.



    To add a new broker all oyu have to do is right mouse click the config manager in the Domains view or use menu option: file - new - broker








    #



    The Event Log in the Message Brokers Toolkit can be used to check that the broker has been successfully added to the domain.



    You can also look at the Windows Event Viewer



    When a broker is first added to the domain, a warning is displayed in the Alerts view indicating that the Execution Group is not running, as shown below.



    It is normal to see this message before any message flows or message sets have been deployed to an execution group. The execution group is not started until
    resources are deployed to it.

    The simple broker domain is now complete and the broker is ready for message flow applications and resources to be deployed to it. My next article will be about how to deploy resources to a broker domain.


Get my Message Broker course here >> http://www.themiddlewareshop.com/products/

Steve Robinson - IBM Champion 2013

About Me

Steve Robinson has been working in IT for over 20 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware.

In January 2013, I was awarded the prestigous 'IBM Champion' accolade.


Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Other Categories