Message selectors

          Two questions:
          1.) Where does the message selector query get executed? Either every subscriber
          gets all messages for the subscribed topic and then runs the selector against
          it, or the server runs the selector on the message before sending it out to the
          subscriber. While it may seem like the latter is preferable, I wonder how much
          performance on the server side will be affected as a result of the server processing
          ALL of the message selectors. If the former is the case, there is obviously more
          network traffic, but the server's processing time is reduced when many messages
          are sent out to many subscribers with message selectors. Does anyone have any
          input on this?
          2.) Are there any plans for Weblogic supporting subscriptions to a hierarchial
          topic? For example, subscribing to cars.* will return messages sent to the topic
          cars.bmw and cars.ford. I know this is not part of the JMS specification, but
          it is a nice addition.
          Thanks.
          Dan
          

          Tom Barnes <[email protected]> wrote:
          >Hi Dan,
          >
          >Answers in-line.
          >
          >Dan Baumbach wrote:
          >
          >> Two questions:
          >> 1.) Where does the message selector query get executed? Either every
          >subscriber
          >> gets all messages for the subscribed topic and then runs the selector
          >against
          >> it, or the server runs the selector on the message before sending it
          >out to the
          >> subscriber. While it may seem like the latter is preferable, I wonder
          >how much
          >> performance on the server side will be affected as a result of the
          >server processing
          >> ALL of the message selectors. If the former is the case, there is
          >obviously more
          >> network traffic, but the server's processing time is reduced when many
          >messages
          >> are sent out to many subscribers with message selectors. Does anyone
          >have any
          >> input on this?
          >
          >If you use the WL topic multicast extension, the former. The former
          >is the
          >obvious choice using multicast, as the server only has one network call
          >to make per
          >message...
          >
          >Otherwise, the latter. The latter is preferable, as otherwise the
          >server would
          >be making one network call be subscriber per message - which is far more
          >heavy-weight.
          >
          >>
          >>
          >> 2.) Are there any plans for Weblogic supporting subscriptions to a
          >hierarchial
          >> topic?
          >
          >This is under consideration.
          >
          >> For example, subscribing to cars.* will return messages sent to the
          >topic
          >> cars.bmw and cars.ford. I know this is not part of the JMS specification,
          >but
          >> it is a nice addition.
          >
          >Yes, topic hierarchies are not part of the JMS specification, but you
          >can emulate them
          >fairly easily, if somewhat inefficiently, by using JMS selectors with
          >a "like" clause.
          > The publisher sets a correlation-id on the message:
          >msg.setJMSCorrelationID("cars.ford");
          > The subscriber sets its selector to "JMSCorrelationID like 'cars.%'"
          >
          >>
          >>
          >> Thanks.
          >> Dan
          >
          >Tom
          >
          

Similar Messages

  • 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.

  • 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.

  • JMS Adapter Message Selector Problem...

    Hi
    I have set the following in the invoke before producing the message and dropping on the queue
    <invoke name="Invoke_1" partnerLink="adapt"
    portType="ns1:Produce_Message_ptt"
    operation="Produce_Message"
    inputVariable="Invoke_1_Produce_Message_InputVariable"
    bpelx:inputHeaderVariable="Sender"/>
    On the receive side I have the message selector configured for the adapter as follows:
    <jca:operation
    ActivationSpec="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec"
    DestinationName="dattjndi"
    UseMessageListener="false"
    MessageSelector="Sender=AdaptationRequest"PayloadType="TextMessage"
    OpaqueSchema="false" >
    </jca:operation>
    Where AdaptationRequest is the value for the Sender variable which will be used to filter the message. But this does not work. the messages are still not consumed. What could be the problem?
    Thanks,
    Anil

    did you check the message selector section on
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html
    explains all the operators you can use and the correct syntax. Make a note of the case sensitivity.

  • Trouble using JMS Message Selector and DCJMSMessageProperty0

    Hello Experts!
    My scenario is Mainframe => MQ => JMS Adapter => XI => SAP
    My MQ channel is communicating fine to XI and I've set the JMS adapter to JMS Compliant.
    I have multiple message types with consistent headers but varying data layouts that I need to route to different mapping objects. So it seems the best solution for this is JMS Message Selector based on reading a header value from one of the dynamic message properties.
    I've read SAP Notes and SAP Library and SDN Wiki articles about this configuration and I think its possible.
    http://help.sap.com/saphelp_nw04s/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/frameset.htm
    Note 856346 - J2EE JMS Adapter: Frequently Asked Questions (FAQ)
    Note 1086303 - XI JMS Adapter and IBM Websphere MQ: FAQ
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/usage%252bof%252bmessage%252bselector%252bfor%252bjms%252bsender%252badapter
    My mainframe sends an MQ message that includes some extra header information like
    field: ApplType  VALUE: 000000002                                              
    field: ApplName    VALUE: MIS056O          
    I configured my Communication Channel to set Adapter-Specific Message Attributes and also Additional JMS Message Properties to include ApplType and ApplName.
    However, I can only see some of the standard JMS header items such as CorrelationID, none of the additional ones.
    In RWB I see "JMS property 'ApplType' that corresponds to dynamic header 'DCJMSMessageProperty0' is missing from JMS message 'ID:f2f0f0f9f0f4f2f1f0f9f1f5f5f3f7f44040404040404040'; consequently it cannot be added to XI message 'e136a6e8-8580-4adc-2007-9ccab93f1ef4' as a dynamic header"
    Can anyone with some experience doing this help me see if I'm missing a trick somewhere? How can I see where this information is being dropped? Could it be when MQ is handing to JMS?
    Many thanks,
    Aaron

    After sifting through some IBM documentation I found that the PutApplName field actually maps to JMS name JMSXAppID. So after adding this to my Additional JMS Message Properties list I get the dynamic JMS message property I need for sorting out the messages.
    http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/topic/com.ibm.mq.csqzaw.doc/uj25450_.htm

  • JMS message selector

    hi there,
    any one used JMS message selector field in the JMS sender adapter. I want to filter out messages that are relevant for various interfaces. where do i set the filter value. i read java docs, it says the filter is possible for message header and properties. the weblog on sdn is not exactly clear and it doesn't work either.
    thx

    Ya you can go ahead with it right ??? See it says you can filter on the basis of header info and its properties , so header info will have originating source info. Its worthful to use it that way . Please clarify if i am wrong , i think thats what u require filter msg on basis of interface for what you are using the adapter.
    ref : http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html
    ref : http://help.sap.com/saphelp_nw70/helpdata/EN/45/20d245ceff2b35e10000000a1553f7/frameset.htm
    I just tried , see if it helps , or i am wrong in getting your question
    If helpful please award points
    Abhishek

  • JMS Sender adapter Message selector

    Does anyone know of a good blog where someone is showing how to use the JMS message selector option in the JMS sender channel?  I'd like a screenshot of what is actually typed into this field most of all.

    did you check the message selector section on
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html
    explains all the operators you can use and the correct syntax. Make a note of the case sensitivity.

  • JMS Message Selector on Message Payload

    Hi,
    I have a requirement where in;
    A JMS adapter consumes messages from an AQ JMS Topic. We need to make selective dequeue from the Topic. Is that possible to make use of the message selector option on the 'message payload'?
    Message selector works on JMS Header and Properties as far as I know.
    Any insight on this would be of great help :-)
    Thanks,
    Manoj Nair.

    It's like almost a month to get a response for such a generic JMS functionality. Looks like the Oracle SOA user base is really low. Anyone with a working example reference.
    Thanks

  • AQ Adapter with message selector rule

    Hi,
    I'm doing a B2B11g implementation on AS2. Incoming messages are processed using the AQ adapter. Now I have several (about 8) AQ-adapter implementations on the IP_IN_QUEUE that select messages using a message-selector-rule based on the DocumentType. So each SOAComposite dequeues and processes the appropriate document.
    This works fine, but I'm looking for any performance recommendations on this.
    What is the impact on CPU for example using message selector rules? Any do's and don'ts on this?
    Thanks in advance.
    Regards,
    Martien

    http://download.oracle.com/docs/cd/B14099_19/integrate.1012/b25307/adptr_aq.htm#CJAEIACG

  • A basic query with respect to using Message Selectors in JMS

    Hi
    When i am going MEssage Selectors topic in web , it seems very confusing for me .
    I have written a simple JMS Application based on Weblogic as my Queue .
    I have two Java Files one for Message Producer and another file acting as Message Consumer using MDB
    I have a basic TextMessage with some header properties in my Producer file .
    Please tell me in what file should i put MessageSelector ??.
    Thanks for reading .
    Please clarify my query on this .

    Thank you very much .
    I found the code of a MDB making useage of a Selector .
    *<message-driven>*
    *     <message-selector>shirtType = 'polo'</message-selector>*
    *     </message-driven>*
    Assume that i written a MDB that listens to particular type of Messages (Polo in this case ) .
    Please tell me what happens to other messages in the Queue that were never listened by the MDB .
    Thank you .

  • Question about Message Selector

    Dear all,
    I have implemented a JAVA progrram which will sent 10 JMS messages into AQ sequentially, and then use another JAVA client which will get JMS message from the AQ.
    I found out that if i use Message Selector to get message from AQ, the message will NOT be read from the queue by enqueue_time, how can i get the jms message from AQ by message selector that can preserve the enqueue_time order?

    Have you got a lot of MTA?
    Because you can create one rule by MTA...
    Example:
    In message filter:
    verylongbloke sayed how do that...
    and in content filter:
    rule1: if (header("X-IP") == "^1.1.1.1$") { alt-mailhost ("[1.1.1.1]"); }
    rule1: if (header("X-IP") == "^1.1.1.2$") { alt-mailhost ("[1.1.1.2]"); }
    It's not very sexy but it works fine...
    unfortunately, we can't use variable for alt-mailhost action... or I don't know how :)
    regards..

  • How to use timestamp based dynamic message selector?

    Is it possible with message selector to issue query like statement that
    weill fetch any messages that have header timestamp older than "now" + 3 hrs.
    In SQL you would say something like:
    where timestamp <= sysdate + (180/1440)
    Please let ne know.
    Thank you,
    Edmon

    hi edmon,
    to my knowledge dynamically evalutaed expressions like this are not supported by any of the JMS vendors. messageselectors are in SQL92 format and the only dynamic part in them is the contents of the message properties and headers.
    So, you're out of luck with what you want to do (e.g., remove expired messages from a destination when they havent' been consumed within a time threshold??) but i could see two possible solutions:
    1) You could use time-to-live (TTL) on the sender side. Messages that are on the destination beyond their TTL would be placed onto a dead message queue (DMQ) from where you could consume them for further processing. DMQ is not a standard-JMS feature but supported by a few vendorrs (e.g., JBoss, ArjunaMS).
    2) You could use Message-driven Services (MDS) for more elaborate server-side message processing. MDS has been pioneered by ArjunaMS but is also available with a few other JMS vendors.
    Hope that helps!
    Kind regards,
    Thomas.

  • Problem using Message-Selector

    Hi,
    out client-application subscribe to a JMS-topic on OC4J (9.0.3) using the following code
    TopicConnectionFactory oConnectionFactory = (TopicConnectionFactory) ctx.lookup("jms/MyTopicConnectionFactory");
    oConnection = oConnectionFactory.createTopicConnection();
    oTopicSession = oConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    Topic topic = (Topic)ctx.lookup("jms/MyTopic");
    TopicSubscriber sub = oTopicSession.createSubscriber(topic);
    Everything works fine.
    But when we replace the last line to use Message-Selectors
    TopicSubscriber sub = oTopicSession.createSubscriber(topic,"username = 'abc'",false);
    we get the following (strange) error (which occurs at excactly that line)
    javax.jms.InvalidDestinationException: Invalid topic
    The topic can't be invalid, because we could subscribe without Message-Selector. Do I have to modify the topic at the JMS-Configuration? Any ideas?
    Thanks,
    Gilbert

    Hi Gilbert,
    The way I've done it is by defining the rule when creating the subscriber in the database (thru DBMS_AQ). The following document might give you some insight.
    http://otn.oracle.com/pls/db92/db92.show_toc?partno=a96587&remark=drilldown&word=DBMS_AQ
    HTH.

  • OSB JMS Message Selector / Filter

    HTTP PS and JMS BS puts messages on WLS JMS Queue. We need consume some messages from the Queue based on payload content since interfaces for other messages may go Live in next year.
    JMS Message look like
    <Schools>
    <School>
    <Id></Id>
    <ServiceArea>100</ServiceArea>
    <Type></Type>
    </School>
    </Schools>
    We need to consume messages where ServiceArea = 100.
    Can you advise how to consume messages where ServiceArea = 100 ?
    I would appreciate your help.
    Thanks in advance.
    Kiran
    Edited by: 844345 on Mar 14, 2011 5:02 PM

    JMS message selector on message payload fields is not recommended and it will have performance implications. Instead you can design this in either of the 2 ways below
    1 - Modify the HTTP PS which publishes the message to set the JMSCorrerlationID header ( or any othe custom JMS property) with the value of Service Area. You can achieve this using Transport Header action in HTTP PS route node.
    For the JMS consumer proxy set a message selector on the JMS transport page to filter only messages belonging to this service area.
    2. Let the HTTP PS continue publishing all messages to the output queue. Have a new component in your design called a 'disaptcher' which reads all the message from the output queue, check service area tag and route messages belonging to particular area to an area specific queue. Have your jms consumer specific for service area 100 to listen to only this Area specific queue.

  • Experiences using the JMS Message Selector

    I am using a JMS Adapter Sender Communication Channel and try to select the messages I want to consume with the Message Selector. My first attempts all failed - I am not sure if the syntax I am using is correct or if anything else has to be set up to use the Message Selector.
    My sample was to enter the following into the field for Message Selector:
    JMSCorrelationID = '123456789012345678901234'
    I also tried the following variations:
    JMSCorrelationID = "123456789012345678901234"
    JMSCorrelationID = 'ID:123456789012345678901234'
    JMSCorrelationID = "ID:123456789012345678901234"
    but none of them were successful.
    Anybody got that feature to work yet and can help me...
    regards,
    peter

    Now I found it out finally...
    JMSCorrelationID = 'ID:41727469636c655570646174656400000000000000000000'
    where ID: is obviously added by JMS? XI? don't know... and the actually id is in Hex...
    can anybody enlighten me on the details?
    regards
    Peter

  • Dynamic Message Selector

    I am faced by a requirement where I need to be dynamically keep changing the message selector's defined on the MDB's, without redeploying them.
    Is this possible to do ? and if yes can someone point me in the right direction or give me some examples on how to do this ?
    Thanks,
    AA

    Hi Ankit,
    Did you make out how to implement message Selector. I have the requirement and i stuck up . If you suceeded, i need help.
    How you achived this.

Maybe you are looking for

  • How to get a correct date format

    Hi Experts, I fetched a record from the table KALV. Here its showing the date format as DD.MM.YYYY. But in my internal table and my output its showing YYYYMMDD. How to solve this? Actually this report needs to show the output as per the user's format

  • In which table attributes of program get stored.

    Hi, I want to know in which table or is there any function module which i can make use of to find out attributes of program. I am specifically interested in knowing Logical Database specified during program attribute declaration dynamically in my rep

  • Resseting iPad and photos in photo stream!

    Friends, I have to reset my iPad because is desabled. But I want to know what about the photos that I have uploaded before in My Photo Stream. will they be saved in iCloud and not to be deleted while resetting. And can I download them again in Camera

  • The message app was deleted off my ipad how do I fix it ?

    I tried the reset home layout that did not work please help. Ever time I look up previous messages that shows but when I click it it says error and the app was deleted from my ipad

  • Project manager question

    I'm doing multicam work, with lots of footage. PPro seems to be bogging down my system. Therefore, i've decided to export my multicam sequences into separate projects. My question is, if i grab the Main project, and the multicam pre-comp, does premie