WebSphere MQ XMS and IBM Global Services - Websphere

This is a discussion on WebSphere MQ XMS and IBM Global Services - Websphere ; Hi there I am hoping that someone can help get me started in the right direction. I am developing a generic connector for IBM WebSphere MQ and our integration product. Our initial target is IBM Global Services, to support one ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: WebSphere MQ XMS and IBM Global Services

  1. WebSphere MQ XMS and IBM Global Services

    Hi there I am hoping that someone can help get me started in the right direction.
    I am developing a generic connector for IBM WebSphere MQ and our integration product. Our initial target is IBM Global Services, to support one of our clients. But I don't want to limit the connector to that one service.

    So far I can connect to a Queue, put and get a test message to a test WebSphere MQ server that I set up. That's the good news. The bad news is that I can't seem to find a way to control what type of messages I fetch from the server (Byte,Stream,Text,Object,...) if there is no way I guess I will have to code converters for all of the message types (to and from our internal format). Also I am unclear as to which properties the system sets, and which ones I can set manually. Another question concerns message selectors, do they follow a SQL standard or is there a different standard for them? The reason I ask this is that our tool generates select statements and filters based on a GUI representation, and I would like to extend that functionality to the WebSphere connector as well.

    I have found quite literally an overwhelming amount of documentation on WebSphere, and quite a bit less on Global Services. Most of the docs that I have seen are based on Java, unfortunately I am in a .NET world using XMS, and the correlation between the Java Docs and .NET is not exactly clear.

    If anyone could point in the right general direction I would greatly appreciate it.

    Charles Horan


  2. Re: WebSphere MQ XMS and IBM Global Services

    charles.horan@gmail.com wrote:
    > Hi there I am hoping that someone can help get me started in the right direction.
    > I am developing a generic connector for IBM WebSphere MQ and our integration product. Our initial target is IBM Global Services, to support one of our clients. But I don't want to limit the connector to that one service.
    >
    > So far I can connect to a Queue, put and get a test message to a test WebSphere MQ server that I set up. That's the good news. The bad news is that I can't seem to find a way to control what type of messages I fetch from the server (Byte,Stream,Text,Object,...) if there is no way I guess I will have to code converters for all of the message types (to and from our internal format). Also I am unclear as to which properties the system sets, and which ones I can set manually. Another question concerns message selectors, do they follow a SQL standard or is there a different standard for them? The reason I ask this is that our tool generates select statements and filters based on a GUI representation, and I would like to extend that functionality to the WebSphere connector as well.


    A client cannot create a selector based on the message type. If possible
    you could add a user property to each message indicating the JMS message
    type (e.g. TextMessage, BytesMessage etc.). Unfortunately I don't know
    of a property header which is automatically set with this information.

    If this is not an option, then you have the option of queue browsing
    which allows you to inspect a queue first and obtain a reference to the
    message. From there you can check its type and perform a receive if the
    client can handle it.

    This seems strange however: are you putting several different message
    types onto the same queue? There's nothing inherently wrong with this,
    but are they all carrying similar information using different message
    types? Is there a good reason for this?

    The message selectors follow the rules as defined in the JMS
    specification. See the MQ JMS docs or the javadoc comments for
    javax.jms.Message.

    > I have found quite literally an overwhelming amount of documentation on WebSphere, and quite a bit less on Global Services. Most of the docs that I have seen are based on Java, unfortunately I am in a .NET world using XMS, and the correlation between the Java Docs and .NET is not exactly clear.
    >
    > If anyone could point in the right general direction I would greatly appreciate it.


    The aim of XMS (both in .Net and C/C++ guises) was that it would behave
    as would a JMS client. As a general rule, the behaviour defined by the
    IBM JMS client implementations should be expected to be the same in the
    XMS clients (barring certain restrictions due to the differing languages).

    Hope this helps,

    Ian.

    --
    ian.burnett@uk.ibm.com :: IBM, Hursley, UK

  3. Re: WebSphere MQ XMS and IBM Global Services

    Hi Ian,

    Thanks for your prompt response, it is appreciated.

    The reason that I am concerned with mulitple message types is that our Connector will be used by a variety of clients and we will have to be able to support whatever implementation they currently have.

    The idea of queue browsing sounds promising, even if it involves extra overhead. Is there a sample anywhere that demonstrates this?

    I will certainly check out the documents that you have indicated.

    One correction from my previous post, it is not Global Services, but the ECI MQ interface that will be our first target. Has anyone had any expierance with this? If so any hints would be appreciated.

    Charles Horan

  4. Re: WebSphere MQ XMS and IBM Global Services

    charles.horan@gmail.com wrote:
    > Hi Ian,
    >
    > Thanks for your prompt response, it is appreciated.
    >
    > The reason that I am concerned with mulitple message types is that our Connector will be used by a variety of clients and we will have to be able to support whatever implementation they currently have.
    >
    > The idea of queue browsing sounds promising, even if it involves extra overhead. Is there a sample anywhere that demonstrates this?
    >
    > I will certainly check out the documents that you have indicated.
    >
    > One correction from my previous post, it is not Global Services, but the ECI MQ interface that will be our first target. Has anyone had any expierance with this? If so any hints would be appreciated.
    >
    > Charles Horan


    Apologies for the slow reply.

    Queue browsing is relatively straight-forward. I don't know of a
    pre-canned QueueBrowser example, but it goes something along the
    following lines (with apologies for the horrible mix of C and Java):

    QueueBrowser qb = session.createBrowser(queue);
    Enumeration e = qb.getEnumeration();

    if ( ! e.hasMoreElements() ) {
    /* Here we would probably sleep for a bit then retry */
    printf("No items in queue\n");
    }
    else {
    /* Messages available on queue */
    while (e.hasMoreElements()) {

    /* Take a peek at the message */
    Message msg = e.nextElement();

    /* Test the message here to see if we want it */
    if (msgIsRequired) {

    /* Spec says message ID is unique -
    * create a selector */
    String msgId = msg.getJMSMessageID();
    String selector = "JMSMessageID = '" + msgId + "'";

    /* Create a consumer that will only match
    * that message */
    MessageConsumer cons =
    session.createConsumer(queue, selector);

    /* Properly get the message */
    msg = cons.receive();

    /* App-specific logic goes here */

    /* Wise to cleanup message consumer here */
    }
    }
    }

    You'll probably notice I'm not perfect on the exact syntax (I'm more
    closely related to XMS C/C++ than XMS .Net), but hopefully this should
    be enough to get you started.

    Unfortunately I don't have any experience of the ECI MQ interface.

    Ian.

    --
    ian.burnett@uk.ibm.com :: IBM, Hursley, UK

+ Reply to Thread