IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

publish a JMS message to UM through Java

  • 1.  publish a JMS message to UM through Java

    Posted Wed January 27, 2016 10:42 AM

    Hi ,
    I want to publish a JMS message (a document) to UM using java code, can anyone help me on this. Thanks!


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker


  • 2.  RE: publish a JMS message to UM through Java

    Posted Thu January 28, 2016 05:10 PM

    please check examples which gets installed with UM.

    or look at UM API documentation available.


    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: publish a JMS message to UM through Java

    Posted Fri January 29, 2016 11:53 AM

    Thanks Mangat, Can you provide me any link to of UM API.


    #webMethods
    #Integration-Server-and-ESB
    #Universal-Messaging-Broker


  • 4.  RE: publish a JMS message to UM through Java



  • 5.  RE: publish a JMS message to UM through Java

    Posted Thu February 18, 2016 04:38 AM

    Hi Abhishek,

    You can use below java code for Publishing JMS messages

    public void JmsMessagePub() throws Exception
    {
    String RNAME={“nsp://127.0.0.1:9000”};
    nSessionAttributes nsa=new nSessionAttributes(RNAME);

                        myReconnectHandler rhandler=new myReconnectHandler(); 
    nSession mySession=nSessionFactory.create(nsa, rhandler); 
    mySession.init(); 
    
    
    nChannelAttributes chaAtt = new nChannelAttributes(); 
    chaAtt.setName("/docs/msgdocumentType"); 
    nChannel myChannel=mySession.findChannel(chaAtt); 
    System.out.println("Channel has been created.."); 
    
    //Constructing an Event
    
    nEventProperties props = new nEventProperties(); 
    
    props.put("bondname", "bond1");
    props.put("price", 100.00);
    nConsumeEvent evt = new nConsumeEvent( "atag", props );
    myChannel.publish(evt); 
    
    }
    

    if you are required more information please let me know.

    Thanks
    Ashish Kumar


    #webMethods
    #Integration-Server-and-ESB
    #Universal-Messaging-Broker


  • 6.  RE: publish a JMS message to UM through Java

    Posted Thu February 18, 2016 01:42 PM

    Above mentioned example works perfectly but keep in mind that properties set (props) will be reflected in the properties section under JMSMessage. If you want to publish some document or data structure that has to be reflected as message under “body” then convert that same to bytes and use nConsumeEvent (String tag, byte[] data)


    #Universal-Messaging-Broker
    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: publish a JMS message to UM through Java

    Posted Wed March 15, 2017 03:56 PM

    Thanks so much for the information. Our organization is looking to publish an event to a TOPIC or Queue from SSIS server. What jar’s do we need them to provide from UM for them to communicate with UM in order for them to publish an event.


    #Universal-Messaging-Broker
    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: publish a JMS message to UM through Java

    Posted Thu March 16, 2017 11:10 AM

    JMSClient jar is necessary for UM API devlopment.


    #Integration-Server-and-ESB
    #Universal-Messaging-Broker
    #webMethods


  • 9.  RE: publish a JMS message to UM through Java

    Posted Fri March 17, 2017 07:29 AM

    For using UM API you will need the below jars located in the directory “/common/lib”

    nClient.jar, nJMS.jar, nAdminAPI.jar

    Refer to the below URL for the API documentation,

    http://um.terracotta.org/universal-messaging-webhelp/Doc/java/index.html

    Regards
    Abir


    #Integration-Server-and-ESB
    #Universal-Messaging-Broker
    #webMethods


  • 10.  RE: publish a JMS message to UM through Java

    Posted Mon March 20, 2017 07:39 AM

    If you are using pure JMS pub/sub, you do not need nAdminAPI.jar. You only need nJMS.jar and nClient.jar.


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker