Filtering within JMS Header

          Hi,
          I am writing a simple jms based application, which has multiple subscribers and
          each subscriber would consume a message based on unique-id. We have the liberty
          to put this unique-id whereever we want (in the message body or header, whatever
          improves performance).
          What is the most efficient way to achieve this? Performance is a big critirea.
          Appreciate your response.
          TIA,
          Don
          

WL has an "indexed subscriber" feature that exactly matches this
          purpose. See the selector section of the
          "JMS Performance Guide" white-paper on dev2dev.bea.com.
          Tom
          Don wrote:
          > Hi,
          > I am writing a simple jms based application, which has multiple subscribers and
          > each subscriber would consume a message based on unique-id. We have the liberty
          > to put this unique-id whereever we want (in the message body or header, whatever
          > improves performance).
          >
          > What is the most efficient way to achieve this? Performance is a big critirea.
          >
          > Appreciate your response.
          >
          > TIA,
          > Don
          

Similar Messages

  • Setting the JMS Header from Payload

    Hi Experts,
    My requirement is to send the payment data coming from ECC to non sap system.Sender adapter is proxy and receiver is JMS.ECC will be sending the filename in one field and payload content as a string in another field.PI has to set the filename coming from ECC in JMS header property.What configuration changes should i need to make in JMS adapter to achieve it?
    Converting the XML to string is possible in PI.But my question is converting the string XML data into XML fields is possible in SAP PI?If so how to do that?
    Please provide your suggestion.
    Regards,
    Karthiga

    Hi Karthiga,
    The UDF is there in blog
    DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");
                DynamicConfigurationKey dynamicconfigurationkey = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS", "DCJMSMessageProperty0");
                String s = dynamicconfiguration.get(dynamicconfigurationkey);
                CorrID.append(s);
    Please let me know if you have any issue.
    regards,
    Harish

  • JMS header properties are null

    Hi all,
    At sending messages to the internal WLI event queue from a client application
    I get the following problem:
    I set a application specific jms header property via the setStringProperty method.
    An event node in the receiving workflow extracts the property with EventAttribute.
    The event node gets the message but the header property is always null. I tried
    various sorts of property names, none of them works. Only the real jms header
    names which are set by the send method give non null values, but I cannot set
    these in the client application.
    Any ideas?

    Hi All,
    I have got it working here is how i did it.
    - transport header add a user defined name and value, it get added to outbound transport header.
    - at receiving end. retrieve it using for/each loop for inbound header user properties.
    Regards,
    Amit

  • JMS Header: JMS Properties and Message Selector

    Hi all
    I´m using a JMS Adapter to consume messages from a JMS queue (a JMS adapter which create the BPEL instance when a message arrives).
    The process must select messages which meet certain criterias, so I´m using Message Selector to filter the messages and only pick up the ones who interest me (If click on the "help" button on JDeveloper Wizard in the page you define Message Selector, you can see an example on how doing this).
    So how can I select messages using values placed on JMS Properties, in the Message Selector?
    For example, I set in the JMS Header:
    JMSInboundHeadersAndProperties
    --------JMSInboundProperties
    ----------------Property
    -----------------------name = 'Country'
    -----------------------value = 'Brazil'
    The JMSAdapter must consume only messages that "Country" = "Brazil".
    Thanks in advance.
    Menezes

    Yes
    I am able to specify JMS Header and JMS Properties when producing a message. However I am not able to user "Message Selector" to filter messages based on JMS Properties information when consuming messages.
    In the link you provide, there is an example on how to use Message Selector:
    # (a copy from the link)
    Message Selector
    ...for example, you can enter logic, such as:
    * JMSType = 'car' AND color = 'blue' AND weight > 2500
    * Country in ('UK', 'US', 'France')
    I believe the example with "Country" is exactly what I need, but I can´t get it work.
    I create the same example above, setting a property named "Country" in the JMSHeader, sending the message to a JMS Queue (BPEL Process #1) and try to comsume it on the Message Selector (BPEL Process#2), but JMSAdapter never consumes the message.
    Thanks for your help.

  • JMS Header

    Hello,
    I'm getting my Unique Message ID from an RFC response  with other elements (in the payload). In my interface, I need to take this Unique Message ID and put the same on the JMS Header.
    Is it possible?
    If yes, Is there any sample or idea?
    Thanks

    Hi Peter,
    You can specify the following in the configuration of your communication channel.
    Go to the Correlation Settings part of your JMS communication channel.
    In the "Set JMSProperty To" text box enter the JMS Property Name [This would be the name of the JMS header you want to set]
    In "Value" select box you have the following four options
    XI Message ID (MessageID) (default value)
    XI Reference ID (RefToMessageID)
    XI Conversation ID (ConversationID)
    No Value
    I think setting value of the JMS header except these four would not be possible.
    Hope this helps.
    Regards,
    Amol

  • Message Selector and Setting JMS Header Properties PL/SQL Enqueue

    Currently I am attempting to use the Message selector functionality. I just know know exactly how we need to set the property in PL/SQL when enqueuing. I also want to verify the syntax that I should use in the event that I am doing this incorrectly...
    The code I am using to test the enqueue is
    declare
    enqueue_options dbms_aq.enqueue_options_t;
    message_properties dbms_aq.message_properties_t;
    message_handle RAW(16);
    agent sys.aq$_agent := sys.aq$_agent('', null, null);
    message sys.aq$_jms_text_message;
    recipients DBMS_AQ.aq$_recipient_list_t;
    BEGIN
    message := sys.aq$_jms_text_message.construct;
    message.set_text('<ORDER><HEADER_ID>16992531</HEADER_ID></ORDER>');
    message.header.set_string_property('bamfilter','ORDER_ENTRY');
    dbms_aq.enqueue(queue_name => 'XX_OM_MONITOR_Q',
    enqueue_options => enqueue_options,
    message_properties => message_properties,
    payload => message,
    msgid => message_handle);
    COMMIT;
    END;
    we have tried a few other methods, but still to no avail...
    the syntax I believe for the selector in the ems should be bamfilter='ORDER_ENTRY'
    Any help would be great.
    The DB the Queue is locate is on 10g if that makes any difference...

    Yes
    I am able to specify JMS Header and JMS Properties when producing a message. However I am not able to user "Message Selector" to filter messages based on JMS Properties information when consuming messages.
    In the link you provide, there is an example on how to use Message Selector:
    # (a copy from the link)
    Message Selector
    ...for example, you can enter logic, such as:
    * JMSType = 'car' AND color = 'blue' AND weight > 2500
    * Country in ('UK', 'US', 'France')
    I believe the example with "Country" is exactly what I need, but I can´t get it work.
    I create the same example above, setting a property named "Country" in the JMSHeader, sending the message to a JMS Queue (BPEL Process #1) and try to comsume it on the Message Selector (BPEL Process#2), but JMSAdapter never consumes the message.
    Thanks for your help.

  • How to set JMS Header Property without using DynamicConfiguration.

    Hi,
    My Scenario is: PDF File -->XI -->JMS
    I need to send the PDF file as it is to JMS receiver, which shouldn't be a problem. The problem is I need to set the same file name in the Receiver JMS header property.
    So to do this I am using DynamicConfiguration in message mapping but when File Adapter picks the PDF file (as it is) I get the run time mapping error which is quite obvious since message mapping expects the data in xml format.
    Do you have any idea if I can avoid the message mapping and set the Dynamic Configuration somewhere else (not sure if java mapping can help here) or if there is some Module available to set file name in JMS header.
    Note: PDF File name is dynamic.
    Thanks!

    I am on XI 3.0. I am not good in java.. can someone give an example?
    Update:-
    I have done some changes to my code and now it is working for me. Since I don't have much knowledge in Java (except writing UDFs )so don't know how good this coding is but defiantly this is my first step to learn Java APIs. Thanks to everyone for their comments & suggestions!!
    If any improvement in below code can be done please let me know.
    package com.sap.xi;
    import com.sap.aii.mapping.api.*;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.HashMap;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import org.xml.sax.helpers.DefaultHandler;
    public class JMSHeaderMapping extends DefaultHandler implements StreamTransformation{
       private Map param;
        public void setParameter(Map map)//to access message header data during runtime
            param = map;
            if(param == null)
            param = new HashMap();
        public void execute(InputStream in, OutputStream out)  //This method is used to run the mapping
        throws StreamTransformationException
                DynamicConfiguration dynamicconfiguration = (DynamicConfiguration)param.get("DynamicConfiguration");
                DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
                String MyFileName = dynamicconfiguration.get(key);
               DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty0");
            dynamicconfiguration.put(key1, MyFileName);
            byte[] inbyte = null;
            try {
        // convert InputStream into byte stream
              int bufsize = in.available();
              inbyte = new byte[bufsize];
              in.read(inbyte);
        // convert byte stream into OutputStream         
              out.write(inbyte);
            catch (Throwable t){
             t.printStackTrace();
    Edited by: Sarvesh Singh on May 9, 2011 8:47 PM

  • How can we add source field data in to receiver JMS header

    I have a scenario called  IDOC(ECC System) or PROXY(SRM System) to JMS(Only one Queue).
                    ECC(Idoc) and SRM(Proxy)   -
    XI  -
      JMS
    In the Idoc and proxy we have a field called Source System. If it is a Idoc then this source system field coming with “SAP ECC” if the data is coming from SRM System then the source system field is “SAP SRM”. My problem is how I can map these fields to the JMS header? Then according to the JMS header TIBCO will send this data to target systems. If data is coming from ECC then it will send it to one Third party system and if data is coming from SRM then it will send it to other Third party target system.

    Hi Purushotham,
    You can add it in receiver determination.
    Our IDOC segement EDIDC_40 contains feild called SNDPRN and SNDPRT.
    By using this in condition for configured receivers you can route this to your desired receiver  system.
    May be you can mantain two queues for your two receivers.
    Regards,
    Akshay.
    reward points if useful.

  • Passing Idoc Control Record information  to JMS header

    Hi All,
    We have a requirement where we need to pass the 'MESCOD' and 'MESFCT" in the EDIDC_40 - Control record for the idoc to the Header of a JMS message.
    Basically we are trying to pass IDOC Control segment to the JMS header.
    I was looking at the options we have in the JMS adapter, and i am not sure how can this be achieved.
    Would appreciate any info on how this can be done.
    Thanks,
    Karthik

    Hi Karthik,
    As suggested by Ravi, you can hardcode this values in XI mapping before pushing data to JMS.
    Otherway round would be...check for User Exit where you can populate EDIDC_40 with MESCOD and MESFCT.
    Nilesh

  • JMS header fields

    Can I update a JMS Message Header field or a JMS System Property for an existing JMS message without receiving it and then puting it back onto the queue ?
              

    You can modify any of the JMS header fields any time you want. To put it
              on a queue would need a producer. But when you call producer.send/publish,
              it will overwrite nearly all of the header fields. The exceptions are
              JMSCorrelationID, JMSReplyTo and JMSType. Those three fields will retain
              the values you set.
              _sjz.
              

  • Search/filtering within playlists feature removed

    Hi,
    Spotify updated itself yesterday to version 1.0.1.988.g8f17a348. The UI got overhauled and few features got removed but the most annoying thing about the change was the disappearance of searching/filtering within a playlist. CMD + F doesn't do anything right now. It was an essential feature used very frequently by me. What exactly was the reasoning behind removing it? Will it be brought back?

    What is the thought process going on with the product and engineering team? Can they stop releasing updates to the product that lack critical functionality? This is the same terrible decision making that allowed the "Your Music" features not to exist on the iPad for a year after it was released everywhere else. What's even more frustrating is that I've now received 2-3 updates since the filter feature was removed and it's still missing! I love Spotify, but this total lack of common sense is unbelievably frustrating and deeply concerning. At this point I wouldn't be surprise if you release a new version that didn't have shuffle or just removed the ability play songs altogether. "Hey the new Spotify looks better than ever and soon we'll add back the ability to play music!!!"* At least I know this guy landed on his feet with a great product manager position at Spotify... https://www.youtube.com/watch?v=AxWWJaTEdD0 *Sorry for the deep sarcasm, but I mean, c'mon man!

  • Accessing JMS header inside plugin

    Hi,
    Is it possible to access the JMS header info of an XML event from inside our plugin
    which we intend to call from the event node.
    I know we can use EventAttribute in the event node but I would prefer if users defining
    templates did not need to know the JMS header settings we use.
    Cheers,
    mairt

    I have solved this problem. The problem was in a way how I have trying to access it. It should be like:
    URL fileURL = this.getClass().getResource("resource/myFile.rdf");
    Zoran

  • Can JMS Message be filtered dynamically based on the JMS Header variable

    Hi All,
    We have a requirement to filter messages from an MQ (Queue) using the JMS Adapter.
    There is only one subscriber to this Queue.
    Can we use the Message Selector option using the same subscriber to pick different messages based on the context set.
    For example I have two BPEL instances running for the same BPEL process and both of them have to read messages from the same MQ Queue, say SampleQueue.
    The first BPEL instance need to pick the messages when JMSpriority = 1
    The second BPEL instance should pick the messages when JMSpriority = 2
    Is this possible? As the Message Selector in the examples given is expecting a literal on the right side of the expression.
    Ex : Country='UK' Color='Green' etc
    To put the question in a different way, can the right side of the expression in a message selector be a BPEL variable?
    Thanks

    Hi
    I have the same question. Basically, I want to match my response message with the request message. I am putting in an id in JMSCOrrelationID in the request. The applciation that send the response put the COrrelationId, I sent into the JMSMessageId. But now, I want to correlate my request and response? What is the best way to do this in BPEL?
    Can the right side be a variable? I want to say JMSMessageID = 'ID: ' + JMSCorrelationId.

  • DAX - IF statement and filters within calculated column

    Hi all,
    I've got a bit of a complex formula I'm trying to run, but I'm not quite there yet.  I don't know where/how/if I can place a filter within my IF statement for a calculated column due to so many variables.  I either get errors or wrong numbers. 
    Hope the following makes sense. 
    Here is my formula for the calculated column [Years Since Last Task]:
    =IF (ISBLANK([Last Task Date]) && ([Current Role]<>BLANK()), DIVIDE([Quarters],4), FLOOR(1. * ( today() - [Last Task Date]) / 365, 0.25))
    Problem:  I am getting "114.25" for Ken....but I want a blank result instead.  Meaning, I need to also filter out any name (row) who has a blank [Current Role].  How do
    I add a filter to this current formula?  Is one more step of filtering possible in this IF statement?  (Maybe I shouldn't use an IF statement, and try CALCULATE instead?)
    Below is the table 'Work' for you to see what's happening.
    Name
    Quarters
    Last Task Date
    Current Role
    Years Since Last Task
    John
    1
    1
    0.25
    Mike
    4
    2/7/2011
    3
    3
    Todd
    5
    4/20/2009
    4
    5
    Jeff
    9/1/2013
    3
    0.5
    Ken
    0
    114.25
    Steve
    2
    12/3/2011
    2
    2.25
    Nate
    2
    1/1/2014
    2
    0.25
    Greg
    1
    8/11/2013
    1
    0.5
    Ross
    4
    11/9/2010
    4
    3.25
    Hope all this made sense.  Let me know if you have any thoughts.
    Thanks,
    ~UG1

    you can use nested IF-statements here:
    =IF (ISBLANK([Current Role]),
    BLANK(),
    IF(ISBLANK([Last Task Date]),
    DIVIDE([Quarters],4),
    FLOOR(1. * ( today() - [Last Task Date]) / 365,0.25)
    hth,
    gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • MQ to File: How to send a Filename from JMS Header (MQ) to a File Adapter

    Hello Experts,
    I have a flat file coming into PI via JMS adapter (MQ) and going out on a File adapter (NFS). We would like to keep the file name consistence throughout the transaction. While coming from MQ our sender is sending the filename in one of the MQ Headers (JMSCorrelationID). We are trying to figure out how to read the file name from the MQ header and send it to the file adapter. Please let us know any other suggestions.
    Thanks,
    Mayur

    Use this UDF code in MessageMapping.
    try
    DynamicConfiguration conf = (DynamicConfiguration)
    container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey KEY_JMSCorrID = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/JMS","DCJMSCorrelationID");
    DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(KEY_FILENAME, conf.get(KEY_JMSCorrID));
    catch(Exception e){}
    return a; //a is some input field.
    Enable ASMA on receiver File channel.
    Edited by: Praveen Gujjeti on Mar 17, 2010 9:23 AM

Maybe you are looking for

  • Integration of ALE and SAP XI

    Hi All I am working on a project that uses SAP XI as middleware. XI reads flat files , converts them  into idocs and posts them to SAP system. The inbound functions are designed to handle one idoc at a time whereas SAP XI is sending all idocs created

  • LMS 4.2 possibility to md5 checksum all ios images in repository?

    Hi, Recently we upgraded a switch with an image from the repository in LMS. After the installation of the image it seemed corrupt. My question now is : Can we do a MD5 checksum on all the images in the local repository to verify that all images are o

  • How do i duplicate CD's or DVD's?

    I need to duplicate a few music CD's  as well as DVD's of music i composed myself but do not want to use iTunes. How do i duplicate those CD's using the internal super burner in my desktop iMac ( Maverick 10.9.5 )

  • Install on win98 machine

    I am having trouble doing an install on a 98 machine the help gave me this input. On the first entry of SQL plus use SYTEm as user and the WIN98 key for the password. This is not working please help.

  • Shopping cart 5 minute waiting/hold

    Hi Forums, Basically, when he gets an email asking for him to approve a shopping cart, he clicks on the link in the shopping cart. This link works correctly and takes him to the login screen for SRM. He logs into that application successfully and app