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
  • 1.  MQ Adapter custom adhoc headers

    Posted Fri November 24, 2023 10:29 AM

    We have a requirement to inject custom headers into webSphere MQ Adapter services. The MQMD header is not an option as that doesn’t allow for other values. So trying to add them to the MQRFH2 header by using the JMSProperties tab. But the adapter doesn’t let us add headers that are not declared in the service inputs.

    Is there a way to achieve this ?


    #Integration-Server-and-ESB
    #Adapters-and-E-Standards
    #webMethods


  • 2.  RE: MQ Adapter custom adhoc headers

    Posted Sat November 25, 2023 01:05 AM

    @rupinder1 One of the community member raised this few years back. Pls check the below thread.


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 3.  RE: MQ Adapter custom adhoc headers

    Posted Mon November 27, 2023 07:07 AM

    It’s always suggested to use user defined header option under JMS headers, for any specific detail user need to send as part of message and to track same after receiving.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 4.  RE: MQ Adapter custom adhoc headers

    Posted Mon November 27, 2023 10:56 AM

    But the user defined headers under JMS are required to be added at design time. Anything that is not in that definition is automatically excluded. So it’s not truly adhoc


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 5.  RE: MQ Adapter custom adhoc headers

    Posted Mon November 27, 2023 12:20 PM

    Consider using a mediation module in IBM Integration Bus (IIB) or App Connect Enterprise (ACE) to inject custom headers into WebSphere MQ messages. This allows for greater flexibility in manipulating message headers and properties, even if they are not explicitly declared in the service inputs. The mediation flow can be customized to add the necessary headers to the MQRFH2 header.


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 6.  RE: MQ Adapter custom adhoc headers

    Posted Wed January 03, 2024 08:32 AM

    I was the one who requested the original feature request back in 2019 from SAG for support to MQIIH headers but it seems they did not make any headway on it. You can do the same thing i did by using the IBM MQ classes to create a Java service to inject the needed headers in to the message for sending outbound messages to the MQ Queue.

    For MQIIH i used below code to inject the headers. You might have to do the same for MQRFH2 headers. Look at this Stack overflow question.

    MQIIH IIHeader=new MQIIH();
    IIHeader.setFormat("MQIMSVS");
    IIHeader.setReplyToFormat("MQIMSVS");
    IIHeader.setAuthenticator(password);
    IIHeader.setSecurityScope(securityScope.charAt(0));
    IIHeader.setCommitMode(commitMode.charAt(0));
    
    MQHeaderList headers=new MQHeaderList();
    headers.add(IIHeader);
    

    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB