This discussion is archived
6 Replies Latest reply: Sep 13, 2012 6:25 AM by Tom B RSS

How to Configure Selector For JMS Bridge

vv*338251*hu Newbie
Currently Being Moderated
Hi,

I was trying with Selector option in working with multiple Bridges, here is the scenario i applied.

Created five Queues ( Q1, Q2, Q3, Q4 and Q5 ) and configured JMS Bridge Destinations having each queue with unique connection factory ( CF1, CF2, CF3, CF4 and CF5 ) and named it as D1, D2, D3, D4 and D5.
Then created JMS Bridges as JB2 with source as D1 and destination as D2. Similarly JB3 as D1-D3, JB4 as D1-D4 and JB5 as D1-D5.
And set Sector for each of JB2, JB3, JB4 and JB5 as Two, Three, Four and Five respectively and did restart after the changes.

Now i am expecting the following scenario to work
Pushing message to Q1/CF1 having Two in the content of message, hence expecting the message to be delivered to Q2/CF2 through JB2, but the messages is not moved through JB2.
Similarly, Pushed message to Q1/CF1 having Three in the content of message, hence expecting the message to be delivered to Q3/CF3 through JB3, but the messages is not moved through JB3. Similar behavior for other messages having Four and Five in the message content.

During the bridge configuration, selected QOS as "Atmost-Once".

Note: All the configurations were done in same domain and the WL version is 10.3.6.0.*

The sample message i am pushing to Q1/CF1 say "Two Test Data"* and expecting to reach Queue Q2/CF2

Regards
Venkata Madhu

Edited by: vv**** on Sep 12, 2012 1:05 PM
  • 1. Re: How to Configure Selector For JMS Bridge
    RenévanWijk Oracle ACE
    Currently Being Moderated
    http://docs.oracle.com/cd/E21764_01/web.1111/e13727/manage_apps.htm#JMSPG302
  • 2. Re: How to Configure Selector For JMS Bridge
    Tom B Expert
    Currently Being Moderated
    Have you checked whether the bridges work when no selector is specified?

    If so, can you post your selector strings?

    HTH,

    Tom
  • 3. Re: How to Configure Selector For JMS Bridge
    vv*338251*hu Newbie
    Currently Being Moderated
    Hi Tom,

    The bridge works well without Selector, my selector entry is Two it is not boolean expression. I am sending message to source code as Two Test data. As i have selector as Two, my message as well contains Two.

    Now bcos of selector, for the above message, the data is not moving to destination queue.

    Regards
    Venkata Madhu
  • 4. Re: How to Configure Selector For JMS Bridge
    Tom B Expert
    Currently Being Moderated
    Hi Venkata,

    The expected selector syntax is the standard SQL-like JMS syntax. There's an extensive description of the syntax in the javadoc for javax.jms.Message.

    Selectors should normally only reference message header fields and message properties. I don't normally recommend using a selector that is based on message body as this requires using a proprietary WebLogic extension based on "xpath" XML expressions, and can have an large impact on performance. (The performance hit is caused by two factors - the need for the JMS server to unmarshal/decompress/page-in the body in order to get at its contents, and the natural cost of scanning a message body to see if it matches a string.)

    HTH,

    Tom
  • 5. Re: How to Configure Selector For JMS Bridge
    Rohith puchalapalli Explorer
    Currently Being Moderated
    JMS Selectors normally work om jms headers and not on the message.

    Apart from the normal headers like corelationid, timestamp, Message id, priority...
    JMS allows you to keep additional name value pairs As properties which you can use in the selector.

    Priority>5

    When creating the message add appropriate proprerties which will help you to use selectors effectively
  • 6. Re: How to Configure Selector For JMS Bridge
    Tom B Expert
    Currently Being Moderated
    JMS Selectors normally work om jms headers and not on the message.
    In my previous post I note that WebLogic provides an "xpath selector" extension in this area, although I recommend using standard selectors whenever possible. See my previous post for details about selector syntax, etc. The best resource on selectors is the javadoc for javax.jms.Message (http://docs.oracle.com/javaee/5/api/javax/jms/Message.html).

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points