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.

Similar Messages

  • 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

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

  • 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

  • OSB Jms Messaging Service

    Hi,
    i want to pass some kind of object argument using jms ObjectMessage and receive it from OSB proxy service.
    I create proxy service as messaging service. but i have no idea with Message Type.
    What kind of message type i should use to read java Object message?
    Is it possible ?
    actually, i am using OSB proxy service as Message receiver.
    then when i receive message, i need to read message from soap body and pass as arguments in business service.
    Is it possible to achieve this?
    With Regards,
    WP

    Hi Wai Phyo,
    waiphyo wrote:
    yeah that is true.
    but i still have no idea how to wrap xml into soap body.
    that's easy there are several ways for doing it, that's one of the easiest:
    http://static.springsource.org/spring-ws/sites/1.5/reference/html/client.html
    waiphyo wrote:
    and how to make message transformation in proxy services layer.
    to transform messages you have to use a mix and match of OSB "Message Processing" actions
    http://download.oracle.com/docs/cd/E13171_01/alsb/docs30/userguide/modelingmessageflow.html#wp1070403
    and either XQuery or XSLT or both called within your proxy actions.
    Regards,
    Tony

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

  • Setting JMS Message header and properties in JMS Adapter ESB Component

    Hi,
    I am new to using some of these adapters in Oracle ESB and need some help.
    I am trying to define a JMS Publisher using JMS Adapter component in JDeveloper. I would like to publish messages with message property set to a topic. I dont find a way to do that.
    I see that for consuming JMS messages, the JMS Adapter allows to specify message selector but I could not find a way for producing message with a user defined message property. I would like to use that property in the message selector to filter messages and consume.
    I am using Oracle SOA Suite 10.1.3.3.x
    Can someone help please?
    Thanks.

    Thanks for the response.
    I think I found the solution although I havent tried it out yet.
    ESB sample 110.JMStoJMSHeaders outlines the approach.
    It is my understanding that JMS Message selector can work on JMS header or JMS properties (user defined) but not on JMS body. (All the three constitue a JMS message). Hence the need to set a JMS property prior to publishing the message to a topic/queue.
    Thanks.

  • JMS Message Property

    Hello Experts,
    we have a JMS to JMS scenario. A third party system sends a message to the JMS Queue (JMS Provider is the J2EE SAP Web AS, XI system). Via JMS Message Selector (configured the JMS Sender Adapter) the right integrationprocess get the message.The integrationsprocess sends the message to another JMS Queue. Because the integrationprocess have lost the JMS Header information (message properties) we configured the JMS Sender Adapter and the JMS Receiver Adapter to copy message properties. Described under help.sap.com:
    you want to set additional JMS message attributes, select Specify Additional JMS Message Properties (Maximum of 10).
    ·        In the table, enter the names of the JMS message properties whose values are to be included in the message header of the XI message.
    The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.
    You can enter more than 10 properties in the table, but only the first 10 are taken into account.
    The attribute namespace for the adapter is http://sap.com/xi/XI/System/JMS.
    I debug and saw that the message properties was sucessfully copied to the header (receiver queue). But now if I use another selector the message will not found. It doesn't work with a third party system and with SAP XI (I've created another integrationsprocess, to read the queue)
    Thanks very much, for your help.
    Regards,
    Jürgen

    Hi there,
    there is a way (and a section somewhere in the help) to set adapter specific attributes in java mappings.
    The java doc for that can be found here:
    https://help.sap.com/javadocs/NW04/current/pi/index.html
    Hope that helps sbd who also has that prob.
    Cheers,
    Helge

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

  • How to do service callout with the incoming JMS message in OSB 11g

    Hello All,
    I have a specific requirement for which I am creating a kind of POC where I need some help in OSB, however am new to OSB.
    My Environment:
    1> I have a request queue (deployed on a WLS domain) - WFReq_WS
    2> I have a response queue (deployed on a WLS domain) - WFRes_WS
    3> I have created a ProxyService (request/response type) in OSB 11g which is simply mapping the incoming message in WFReq_WS to WFRes_WS
    4> I have a WebService (it is currently a simple hello WebService for testing) which takes a string and returns the same string with an added 'Hi' in front of it (e.g. If you send Jack, it will return 'Hi Jack')
    My Requirement:
    1> I have to do some mechanism in OSB, by which while mapping the message from WFReq_WS to WFRes_WS (through the proxy service I have), it will pick the JMS message (which will be a string/text) and will make a service callout to the Webservice I mentioned using the message as the input parameter of the WebService.
    2>Now when the response of the WebService will come, OSB should send this response as the message in the response queue (WFRes_WS) I mentioned above.
    To simplify the requirement using an example:
    A> I will send a text/String message (say Jack) to the request queue (WFReq_WS)
    B> OSB should pick the message (Jack) and make a service callout to the webservice
    C> webservice will return 'Hi Jack'
    D> OSB should send this to the response queue (WFRes_WS)
    I know the above might look very basic question to the PROs, but please elaborate (step by step) what need to be done, since I do not know OSB.
    Thanks a lot for your help !

    Your example points A and D are easily done by having a "Proxy Service" which has the following details:
    Service Type = Messaging Service
    Request and Response type = Text
    Protocol = jms
    Endpoint URI = your request queue (format like 'jms://localhost:7013/weblogic.jms.XAConnectionFactory/QueueJNDIName')
    Checkmark "response" so that the proxy service automatically delivers the response to another queue - your response queue
    Response URI = jms://localhost:7013/weblogic.jms.XAConnectionFactory/QueueResponse
    Now since your "Hello" webservice is (probably) a SOAP xml service you need to "convert" your text based JMS message to xml before sending it on to the "Hello" service.
    Your JMS proxy can do that by just doing a "Assign <whom>{$body/text()}</whom>" to a variable (lets call it 'reqHello')
    Now your JMS proxy should actually call the Hello service and since your JMS proxy is text and the Hello service is SOAP you cannot just "pass" on to the Hello service in a "Route to". Instead you can do a Service Callout where you can specify your "reqHello" variable as payload and a "respHello" as response variable.
    Now you have the "<whom>Hi jack</whom>" in the response variable and since the JMS response needs to be text format you can "extract" the text value into the body variable of the JMS proxy (use "replace /* in body with $respHello/text()" - replace node contents)
    The actual Hello service is a simple "SOAP" based Proxy Service. Add a pipeline and add a stage in the reponse pipeline. Do a ...
    Assign fn:concat("Hi ",$body/whom/text()) to $whomVar
    Replace whom in body with $whomVar (replace node contents)

  • [OSB]JMS Business Service sending message with a given JMSCorrelationID

    Hi,
    Is it possible to send jms message with a given JMSCorrelationID in OSB? Just like use javax.jms.Message.setJMSCorrelationID() before sending.
    If yes, how to change the payload accordingly?
    Any help? Thanks in advance.

    Try Transport Headers action in request action route node (Add Action >> Communication >> Transport Headers).
    Then click on add headers and in name drop down select the JMSCorrelationID. In set Headers to expression select the value you want to put for JMSCorrelationID.

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

Maybe you are looking for

  • While importing a request error message' Check-sum error in data file'

    Hi Friends I have a problem. We are trying to inport a request after putting the files in cofile and data file folders( 4.6C System).While doing so an error message is seen in the log " Check-sum error in data file after XXXX bytes". Can some one hel

  • 'Share' functionality in SHarePoint 2013 - Prevent access to files

    Hello I have a client that has just moved to SP2013 and they used the send document link as hyperlink in email functionality of SharePoint 2010 regularly.  THis was good for them because if the link was sent to a user that did not have access to a do

  • I-Tunes freezes every time I open it

    I just bought the update for 2.0 for my iPod touch. It works great initially until I plug it into my laptop (which has been running 7.7 for a week or so fine). Itunes opened and then immediatly freezed and was not responding. I tried to install 7.7 o

  • Problems with JFileChooser and Windows 2000 (can't see mydocuments contents

    Hi! I've an applet which has a JFileChooser component. In other Windows, I can select the MyDocuments folder and it goes there and list all the contents OK. But, in Windows 2000, when I go to MyDocuments, none of the contents is listed in the file ch

  • Truncating data in prepared statement

    I'm using a prepared statement to pull data out of one SQL database into a recordSet, and another prepared statement to take the data from the recordSet and insert the data into another SQL database. In the source database, the lastname and firstname