Async JMS vs Sync JMS?

So,
At work we are using Oracle Advanced Queuing and the JMS apis to peek at the queue. Now, my question is simply is it possible use message selectors with async queue receivers? ie. setMessageListener?
At work instead of having a node in our cluster subscribe and listen for something relevant we have a thread in an infinite loop constantly polling the database queue using a timed wait. Now when this happens you always end up getting timeout exceptions if there's no work to do. The justification for this was that each node in the cluster filters the messages based using message selectors but surely this is possible using the async APis and setMessageListener.
My concern is that there is a lot of short term objects being created due to this approach and it sounds like the same thing could be accomplished with a push scheme instead of a pull model.
Thoughts?

JMS is really designed for async type operations; set up a subscription of exactly what you need, then let the JMS provider invoke you as and when required.
So just create a MessageConsumer with the selector inside. Then set the message listener on it and you're done.
Note that in many providers, such as ActiveMQ (http://activemq.org/) there's not a huge amount of difference of using consumer.setMessageListener() and consumer.receive() - other than the latter mechanism uses an extra thread.

Similar Messages

  • Correlation issue in JMS adapter - SYNC/ASYNC scenario without BPM

    Hi,
    I am working on a SYNC/ASYNC scenario with JMS adapter without using BPM. My scenario is SOAP<>PI>JMS. I configured the interface as below:
    1. SOAP Sender channel
    2. JMS Receiver Channel writing to Queue A.
         Module used:      a. RequestOneWayBean
                   b. WaitResponseBean
         Correlation Settings:
                   a. Set JMS Correlation ID to "XI Message ID"
                   b. Store JMS CorrelationID of request (Checked)
                   c. Set JMS Property to "JMS Correlation Id"
                   d. Value = "XI MEssage ID"
    3. JMS Sender channel reading from queue B ( I am exporting the message from queue A and importing into queue B)
         Module used:      a. NotifyResponseBean
         Correlation Settings:
                   a. Set XI MEssage Id to "GUID"
                   b. Set XI Conversation ID to "Stored JMS COrrelationID of Request"
    I can see the cid in the message from queue A. But I observed thhat the header format of the message in Queue A is "MQSTR".
    ISSUE:
    1. While writing the message to queue A, below adapter log details(part b) concerned me:
         a. Message '8747a7c2-2b06-11df-8055-005056a70ed6' successfully processed by channel
         b. Could not create acknowledgements for message '8747a7c2-2b06-11df-8055-005056a70ed6'
    I am not sure why I am receiving the message that "  could not create acknowledgements"
    2. While reading the message from the sender channel,I consistently get the error message as below:
         a. XI message ID corresponding to JMS message with ID 'ID:414d51205341504449442e514d202020c67b954b20005602'
              will be created as a new GUID with value '21bca916-424f-41f6-3347-c71090392b58'
         b. Error while processing message '21bca916-424f-41f6-3347-c71090392b58';  detailed error description:
              com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: found no correlation ID: RecoverableException:
              found no correlation ID at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:105) ...
    Below are the blogs which I have already gone through:
    1. JMS Synchronous Scenario without BPM - Correlation Settings and Transactional JMS Session
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b028f6f6-7da5-2a10-19bd-cf322cf5ae7b
    2. Note: 1086303
    3. Sync / Async Bridge without BPM
    In the note, they mentioned something about header being "MQRFH2". BUt in our case, the header is "MSSTR". Not sure whether it makes any difference.
    Please help.
    Edited by: GP on Mar 9, 2010 4:24 AM

    Hi,
    detailed error description:
    com.sap.aii.adapter.jms.api.channel.filter.MessageFilterException: found no correlation ID: RecoverableException:
    found no correlation ID at com.sap.aii.adapter.jms.core.channel.filter.SendToModuleProcessorFilter.filter(SendToModuleProcessorFilter.java:105) ...
    This error would generally arose when there are multiple messages, got stuck in the outbound queue. Try to stop both the sender and receiver JMS comunication channels and clear both the inbound and outbound queues.
    Once all the messages in the queue are cleraed, try posting the message again.
    Regards,
    Swetha.

  • Configuration of Password Sync & JMS Listener in fail over in SUN IDM 7.1

    HI All,
    We are having a set up with IDM running on two Sun application servers pointed to single repository. Sun webserver Reverse Proxy has configured for load balancing.
    We have configured JMS Listener adapter for Password Sync and JMS Listener Sync is running on Instance1*
    and I copied a copy of .bindings file from Instance1 to Instance2 (I doubt whether this is correct or not) by keeping in mind about load balancing with Reverse Proxy.
    Issue
    Some times the JMS Listener Sync running on Instance1 is hanging (no polling is happening) and password changes are not happening. To make password changes happen, we are restarting Application server of Instance1 and with this some password are failing to synchronize.
    I want to configure High availability or Failover to overcome the above issue.
    [http://docs.sun.com/source/819-6123/IDM_admin_passwordsync.html#wp25192] not having any detailed steps to configure failover.
    Please provide valuable suggestions
    Thanks In Advance
    Madhu

    The problem appears to be machine account password changes that pass null or corrupted values. Machine accounts are like users, but the password change occur automatically between machine and DC so that the client can be a member of the domain.
    We turned up the Password Sync logging were able to see the machine name that occurred before each event, and then researching those machines identified them as NT 4.0 workstations. It turns out that NT 4.0 machines cycle their password every 7 days, down to the second. To say that we were surprised to find these machines still on the network was an understatement.
    Contact support for this issue. They have been working on a patch for this.
    Jason

  • JMS Connection Factory jms/QueueConnectionFactory could not be found

    Hi,
    Previously, i tried to extend weblogic domain "oim_domain" that only configured for OIM, and integrate the OIM with OAM 11g.
    The integration was failed, because all users cannot login to OAM login page (using Active Directory authentication), so i rolled back all configuration by copying MW_HOME i've backed-up before extend the weblogic domain.
    When i start the OIM after rolled back, i've found an error message as follow :
    <May 16, 2013 11:38:15 AM WIT> <Error> <oracle.iam.platform.async> <IAM-0050009> <Async Service initialization failed because JMS Connection Factory jms/Queu
    eConnectionFactory could not be found. Please check that a JMS Connection Factory with JNDI Name jms/QueueConnectionFactory is present in the Application Ser
    ver.>
    <May 16, 2013 11:38:15 AM WIT> <Error> <oracle.iam.platform.async> <IAM-0050010> <Error Trace Follows
    javax.naming.NamingException: String index out of range: -1
    at weblogic.jndi.Environment.getContext(Environment.java:308)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    and this error message :
    <May 16, 2013 11:38:15 AM WIT> <Warning> <oracle.iam.platform.utils> <IAM-0070016> <An error occurred while initializing service : oracle.iam.platform.async.
    AsyncService>
    <May 16, 2013 11:38:15 AM WIT> <Warning> <oracle.iam.platform.utils> <IAM-0070016> <An error occurred while initializing service : {0}
    javax.naming.NamingException: String index out of range: -1
    at weblogic.jndi.Environment.getContext(Environment.java:308)
    at weblogic.jndi.Environment.getContext(Environment.java:285)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    Please help.
    Best Regards,
    Heri

    I have the same error!!! Do you manage to solve it?

  • XI JMS adapter after JMS provider reboot

    Hi All,
    I have problem with XI JMS adapter. Adapter is in a JMS client role and JMS provider is Tibco. After reboot of JMS service in JMS provider, XI JMS adapter loose username and pw in connection and try logon to queue as an anonymous user.
    After deactivation + activation of XI JMS adapter, connection seems to work correctly with uname & pw.
    In JMS adapter we have folloving settings and we are connected straight into queue:
    Transport Protocol = SonicMQ JMS Provider
    General JMS Settings:
    Transactional JMS Session is in use
    Delivery Mode of Message Producer = Persist JMS messages..
    + Queue user & pw
    Error Handling Settings:
    Wait After Message Error(msecs) = 60000
    Wait Before Reconnect(msecs) = 60000
    Does anyone ran into this earlier?
    Thanks in advance.
    -Kimmo

    Hi Saravana,
    It seems that no connection is available to queue. In JMS adapter are you using correct path for finding these provider specifig classes in front of class name. Example: javax.jms.QueueConnectionFactory
    It is also possible that username of JMS provider which you configure to JMS adapter does not have correct rights for reading/writing or accessing to queue.
    We are not using any additional settings for JMS adapter. For server name we have also added protocol which is tcp://<servername> and using transactional JMS session.
    We had this same error when trying connect to queue via JNDI. Then we changed JMS adapter to connect straight to queue and it started to work.

  • Setting JMS Selector as JMS Message ID

    Does anyone knows how to set the JMS Selector as JMS Message id, i tried using JMSMessageID=P<720374.1242857046478.0> but i keep getting exception stating
    javax.jms.InvalidSelectorException: weblogic.messaging.kernel.InvalidExpressionException: Expression : "JMSMessageID=P<720374.1242857046478.0>"
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:164)

    Hi Tom,
    Do you know any general solution for the situation you mentioned in your last post on this thread? Unfortunatelly one of our customers have an architecture which mixes a weblogic 8 domain with a weblogic 10 one. The JMS server is in the weblogic 10 domain but they have an OOB IGW application which runs on weblogic 8 and uses the JMS API of it. The IGW application applies the JMS Message Id model for correlating the request and response messages, but the consumer, on the weblogic 10 side, cannot find the response message because the JMS Message Id changed. The JMS of webloigc 8 - I guess - put an 'N' char after 'ID:' into the msgId and paste the whole id into the correlationId field. But on the weblogic 10 side, the consumer have the original msgId without 'N' and, of course, it doesn't find the response msg.
    So do you have any general solution to convert between these different msgId formats?
    Thanks in advance,
    Andras

  • WebLogic JMS and MQ JMS Mix

              I am writing a bean that reads a message from MQ (using MQJMS) and then write it
              onto a WebLogic JMS ( something lika a bridge). However I don't want to use bridge.
              Question/Problem Statement:
              Once I include mq jms jar files in class path. Would that in conflict with WebLogic
              JMS. How do in my program I make sure that it is using the MQ or WLS JMS implementation.
              I can have InitialContext() setup for mq in File and for WebLogic it is WebLogic's
              Initial Context. Thats is the only thing that I can tell in the program.
              Basically, I am trying to see what will make it ( fully qualified JMS Objects
              or what) decide which implmenatation to use.
              Chris
              

    The WebLogic JMS and MQSeries JMS classes won't conflict. Each JMS provider
              provides different classes that implement the same interfaces, so you can
              have a whole bunch of providers in your classpath and things should be OK.
              Most code that's written to the JMS API (including the code inside WLS that
              receives messages for MDBs) gets the JMS "ConnectionFactory" via JNDI, and
              uses that to create the other objects. (It also has to look up the
              "Destination" objects from JNDI.) When you code to the JMS standard only,
              then the only thing that "tells" your program which provider is being used
              is the ConnectionFactory class that you create or get out of JNDI.
              Below is my usual plug for the white paper that helps explain some of this
              stuff:
              http://dev2dev.bea.com/resourcelibrary/whitepapers.jsp?highlight=whitepapers
              Look for "Using foreign JMS provdiesr with WLS".
              greg
              "Chris" <[email protected]> wrote in message
              news:[email protected]...
              >
              > I am writing a bean that reads a message from MQ (using MQJMS) and then
              write it
              > onto a WebLogic JMS ( something lika a bridge). However I don't want to
              use bridge.
              >
              > Question/Problem Statement:
              > Once I include mq jms jar files in class path. Would that in conflict with
              WebLogic
              > JMS. How do in my program I make sure that it is using the MQ or WLS JMS
              implementation.
              > I can have InitialContext() setup for mq in File and for WebLogic it is
              WebLogic's
              > Initial Context. Thats is the only thing that I can tell in the program.
              >
              > Basically, I am trying to see what will make it ( fully qualified JMS
              Objects
              > or what) decide which implmenatation to use.
              >
              > Chris
              

  • What is the association between JMS Server and JMS Module in weblogic 10?

    Hi,
    I have a created a ConnectionFactory, Queue, Topic under JMS Modules in Weblogic Server 10 using admin console.
    And I have created a JMS Server and Targetted to the current running server (Admin Server).
    But when I run the Queue Sender program it is unable to LookUP the jndi which I gave for Queue.
    queue = (Queue) initialContext.lookup("jndi_queue");
    Exception:
    javax.naming.NameNotFoundException: Unable to resolve 'jndi_queue'.
    But I configured this jndi name when I create the Queue in JMS Module in Weblogic Server 10.
    How JMS Module and JMS server are associated.
    My Doubt is if i have several JMS Modules and only one JMS Server created then how does the JMS Server identifies which Queue/Topic belongs to which JMS Module????
    Please advice.
    Thanks....

    Hi,
    Once you have JMS servers configured:
    Step 1: Target the JMS configuration module to the cluster that will host the destination, or, if not using clustering, target the module to the individual WL server that will host the JMS server.
    Step 2: Configure a "subdeployment" for the module and set it to reference the exact JMS server(s) that will host the destination. If you're using a distributed desitnation, you can specify multiple JMS servers, if you're using a regular destination, only specify a single destination.
    Step 3: Create a destination resource in the module, and set its subdeployment to the subdeployment you specified in step 1 (the console calls this "advanced targeting"). As a best practice avoid the "default targeting" option for the resource - always choose subdeployment (advanced) targeting.
    For more information, reference the "best practices" chapter of the JMS configuration guide:
    http://download.oracle.com/docs/cd/E14571_01/web.1111/e13738/best_practice.htm#CACJCGHG
    I also I highly recommend the JMS chapter of the book "Professional Oracle WebLogic".
    Hope this helps,
    Tom

  • JMS to non-JMS

    We have developed a non-JMS Messaging system (used publisher-subscriber model, following avalon framework). Now my requirement is to listen to the JMS events. I mean, my event listener should be able listen to event published by any JMS messaging system. Is there any way to do this.
    We need to see a way to interop with JMS requests and send responses. ie bringing a sort of compatibility in exchanging messages between JMS and non-JMS Notification services. is there any way to do it?

    Yeah, I too have a idea of using MDB to achieve this. Can you please provide some information on this or some links or prototypes where it has been implemented.

  • Error status in JMS adapter - sync / async brigde. Message processed ok

    Hi guys
    I'm having som trouble with my scenarion. I'm sending sync message from SAP backend to XI using proxy. From XI onwards to JMS adapter async (and the other way around for the response message).
    This works OK. However i have a status error in my RWB on the JMS adapter. There is er red exclamation mark and a text saying:
    Correlation ID 'XXX' of JMS request message 'ID:yyy' saved that correponds to XI message 'XXX'
    How do I get my adapters in status green?
    Kind regards
    Martin

    Hi Kai
    Oh - OK
    Settings are:
    Receiver JMS channel:
    Set JMSCorrelation to: XI Message ID (MessageID)
    Store JMS CorrelationId of request: Mark
    Sender JMS channel:
    Set XI Message ID (MessageID) to: GUID (Recommended Value)
    Set XI Conversation ID (ConversationID) To: Stored JMS CorrelationId of Request.
    Kind regards
    Martin

  • SOAP to JMS using Sync/Async bridge - configuration confirmation needed

    Hi group,
    Since I'm experincing error in a scenario using sync/async bridge in jms adapter I really would like a confirmation on my configuration.
    For a simple SOAP to JMS scenario is it then correct that all I need is;
    1) 2 synchronous message interfaces, 1 inbound and 1 outbound
    2) 1 Receiver determination
    3) 1 Interface determination
    4) 1 Receiver agreement (JMS adapter with module configuration)
    5) 2 Sender agreements (in my case 1 soap and 1 JMS adapter - the later with module configuration).
    6) The sender and receiver JMS adapters point to different MQ queues (request and response queues)
    7) The sender agreement for the JMS adapter uses my synchronous, inbound message interface (isn't this really just a "dummy" to actually fetch data from response queue - meaning that the actual utilized business system/service, MI and namespace are unimportant, since the module will make the adapter notify the listening module in the receiver JMS adapter?)
    Best Regards,
    Daniel

    Hi, thanks for your reply.
    I'm familiar with the links provided. I believe everything is configured as it should be, but since I get error I would like to have my configuration confirmed. Neither the weblog (or SAP guide) are detailed enough to convince me 100% that my configuration is correct. Surely the problem could be on the MQ side, but before going into that, I want to be sure that its not on XI-side.
    So I really would like confirmation on the steps/question that I wrote:-)
    Best Regards,
    Daniel

  • Sync Async without BPM and JMS.

    Hi Guys,
    Searched SDN a lot but in vain...
    i have soap(Sync) to File(Async) synario...Soap response can have like this "PI system received message"..
    How can i, with out BPM?
    Thanks
    Prabhakar

    i have soap(Sync) to File(Async) synario...Soap response can have like this "PI system received message"..
    If the SOAP is mandatorily working in SYNC mode then the above solution wont work (SOAP --> XI --> SOAP)....this will be treated as two different calls for the SOAP and the solution would have worked for ASYNC flow.
    Why do you need PI system received message .... if i send a SOAP message and if it is successfully send from the SOAP application then I would get a 200 OK message which would indicate that everything was fine till sending the message to the XI/ PI system.
    If SYNC communication is needed then implement a BPM with a SYNC-ASYNC bridge.
    Regards,
    Abhishek.

  • Significance of async-enabled option of jms-messaging-bridge

    Hi Folks !!
    I have a question regarding JMS-MESSAGING-BRIDGES:
    What difference will async-enabled = true | false will make to the bridge? Which option will be good from performance point of view ?
    Thanks in advance.
    Edited by: 994778 on Mar 19, 2013 7:05 AM

    As you know, the bridge acts as a receiver from the source destination and a sender to the target destination. When async-enabled is set to true, the bridge works as an asynchronous listener to the source destination, while otherwise it acts as a synchronous receiver. In other words, the former is a push mode and the latter is a poll mode. The sync mode does batching while async mode does not. There are a couple of things that you need to consider while determining which mode is better, such as the desired QOS of the bridge, and whether you are bridging between wls destinations or a WLS destination to/from a 3rd party destination. For example, if you requires exactly-once QOS and your source destination is not a WLS JMS destination, you have to use sync mode; actually the bridge internally will switch to sync mode even if you set it to async mode.
    You can find the tuning guide for the messaging bridge at
    http://docs.oracle.com/cd/E17904_01/web.1111/e13814/bridgetuning.htm#g1153237
    Regards,
    Dongbo

  • Use JMS For Sync interface

    Hi all ,
    We would like to make a sync interface that retrieve information from the R/3, the send application is at the Mainframe so we use the WebSphere MQ to send the request to the XI using the JMS adapter and than to the R/3 via the RFC adapter (Appl A -> WbSphere MQ -> JMS Adapter -> XI -> RFC Adapter -> R/3 and via versa ).
    Can we use the JMS adapter for that scenario ? can the JMS adapter be used for synchronous interface ?
    Best Regards ,
    Yaki

    Yes you can use JMS. You will still have to interpret the message so you can update the database but your client can do this asynchronously. In other words the client can send the message to JMS and go about doing other things instead of having to wait for the process to complete. We are actually doing this sort of thing and it is working out well.

  • Class not found with jms cache sync

    hi. when i try to use the remote command manager in my live environment only i get a class not found exception for my initial context factory. using a debugger i discovered this is actually hiding a linkage error. so i confirmed that my resin and java versions and all my jars are the same between live and stage, where this works no problem. but still doesn't work in production. any ideas what else i should look at? here's a stack trace
    Exception [TOPLINK-22101] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.RemoteCommandManagerException
    Exception Description: Could not obtain JNDI context with properties {java.naming.provider.url=tcp://10.10.6.73:3035, java.naming.factory.initial=org.exolab.jms.jndi.InitialContextFactory , java.naming.security.principal=tcp://10.10.6.73:3035, dedicated.connection=true, java.naming.security.credentials=tcp://10.10.6.73:3035}
    Internal Exception: javax.naming.NoInitialContextException: Cannot instantiate class: org.exolab.jms.jndi.InitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.exolab.jms.jndi.InitialContextFactory ]
    at oracle.toplink.exceptions.RemoteCommandManagerException.errorObtainingContext(RemoteCommandManagerException.java:42)
    at oracle.toplink.remotecommand.TransportManager.getContext(TransportManager.java:194)
    at oracle.toplink.remotecommand.TransportManager.getRemoteHostContext(TransportManager.java:385)
    at oracle.toplink.remotecommand.jms.JMSTopicTransportManager.getRemoteHostContext(JMSTopicTransportManager.java:270)
    at oracle.toplink.remotecommand.jms.JMSTopicTransportManager.getTopicConnectionFactory(JMSTopicTransportManager.java:204)
    at oracle.toplink.remotecommand.jms.JMSTopicTransportManager.createJMSTopicRemoteConnection(JMSTopicTransportManager.java:84)
    at oracle.toplink.remotecommand.jms.JMSTopicTransportManager.createLocalConnection(JMSTopicTransportManager.java:106)
    at oracle.toplink.remotecommand.jms.JMSTopicDiscoveryManager.startDiscovery(JMSTopicDiscoveryManager.java:44)
    at oracle.toplink.remotecommand.RemoteCommandManager.initialize(RemoteCommandManager.java:132)
    at oracle.toplink.publicinterface.DatabaseSession.login(DatabaseSession.java:509)

    I would guess the problem is related to the application's class-loader visibility. Verify that your application can access the class org.exolab.jms.jndi.InitialContextFactory forio to launching the TopLink session. If it cannot then you may need to address the container's access to this library.
    Doug

Maybe you are looking for

  • Still having problems with insufficeint permissions - after clean install

    I'm seeing this on multiple friends' computers, and now have it on mine. An auto update fails with the error of insufficient permissions.  (I can't find how to post a screen shot of it.) I read through several discussions, and ran the manual uninstal

  • Needing a mini to video/audio edit/produce.

    been digging deeper and deeper into video and audio production and editing. currently im running a 24" imac 2.4ghz, 1gb ram, i use it as my everyday computer and i been playing around with some video editing and a good bit of audio production. (im go

  • Unable to see imported RFCs in the BPM

    Hi, I want to invoke a BAPI from a BPM, but I am unable to see the BAPI request / response interfaces in the BPM. I am trying to create Containers and Transformations in the BPM, but I am unable to select the BAPI request / response interfaces. What

  • Data Transfer between AS400(Linux) and Oracle(Windows Server)

    Hi, We have AS400 system which resides on Linux architecture. We want to transfer millions of records from AS400 to Oracle which resides on Windows server. We think to build Odbc connection on windows machine and accessing to AS400 data from this con

  • What is BAPI?

    hi Experts,    What is BAPI?How can i create BAPI?Can u provide me step by step procedure regarding this? thanks Surya