Publish/subscribe in a request/response manner with WCF?

Is it possible to make WCF service work in request/response manner using WCF duplex channels?
Or is there any kind of automatic correlation between the messages when using WCF?
I want to be able to attach WCF service to a topic, and when a request comes, the service to return result, that will be transformed to brokered message and returned over the bus to the caller.
Thanks in advance!

It could help, If there is a way to bind a relay endpoint to a topic...
The scenario in details: I have a service that extracts an object from a database by given identifier. I want to be able to activate that service with a message over a topic. That part is OK, I've did it. But I want the service to return the extracted
value over the topic (or another topic) but I do not want to change the service contract to be OneWay - for interoperability, I need the method in question to take one argument and return object.
So that's why I am searching for a way to bind one message to call the service's method and when it is ready to transform the result in another message and publish it back on the bus.

Similar Messages

  • Implementing synchronous request response behaviour with JMS

    i have a requirement wherein i send a list of tasks to be executed (this has to be executed in parallel so taking the JMS route) and should wait for the results of al these tasks. How could i do this with JMS? I need JMS since the originally these tasks was being done using threading and since in j2ee it is not advisable to spawn threads we are planning to use JMS so that we can have concurrency that is done by the container. can someone please tell how can i simulate this synchronous request-response paradigm using JMS?

    It may not be great idea however possibility of State full session bean can be explored.
    State full session bean will send all 100 tasks to JMS queue without waiting for the result. There will be another JMS program (Say ResponseCollector) which will listen on queue for all responses. Once ResponseCollector collects all the responses, it will trigger the state full session bean again.
    You can use some properties in JMS header to discriminate between the request and response on same queue and apply the message selector.

  • Expose an orchestration as WCF service with a Request-Response port set to Direct Binding

    Hello , 
      I'm trying to expose an orchestration as a WCF service (while the Request-Response port is set to Direct binding) . Is this possible ? (the issue will be correlating back the response to the synchronous WCF request after the response is posted back
    to the Message Box by the Direct Send logical port).
    I have no problem in exposing the orchestration while I'm setting the Binding port to 'Specify Later' (What I'm trying to do actually is to expose a orchestration using different adapters (like Http and Wcf ) in the same time ).
    Thanks

    Yes, you can publish an orchestration as WCF/Web service which has direct bound request-response port.
    Subscription works based on “EpmRRCorrelationToken”
    and “RouteDirectToTP”. When you enlist the orchestration which
    has the direct bound request-response port (also published as service), its subscription are based on above two context properties and they take care of correction.
    And also the response matches to the request part of the port due to the nature of two-way communication protocol.
    Create an Orchestration with direct-bound request-response port and publish it as service. This will work. Give it a try
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Publish Subscribe Server with Filters

    Has anyone managed to get the WebLogic Server 10.3 HTTP Publish/Subscribe server to work with message filters?
    With a message filter configured, running with the Sun JVM I see errors of the following type (JRockit gives an error at the same point but it has less information) when I send a message via JMS:
    <02-Sep-2008 10:43:23 o'clock BST> <Warning> <HTTP Pubsub Server JMS support> <BEA-2152103> <Error occurs when retrieving message from JMS topic.
    weblogic.jms.common.JMSException: [JMSClientExceptions:055115]Error deserializing an object
    at weblogic.jms.common.ObjectMessageImpl.getObject(ObjectMessageImpl.java:190)
    at com.bea.httppubsub.jms.internal.TopicListener.fetchBayeuxMessageFromJmsMessage(TopicListener.java:97)
    at com.bea.httppubsub.jms.internal.TopicListener.onMessage(TopicListener.java:70)
    at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547)
    at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233)
    Truncated. see log file for complete stacktrace
    java.lang.ClassNotFoundException: com.bea.httppubsub.bayeux.messages.DeliverEventMessage
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    Truncated. see log file for complete stacktrace
    My filter is not being invoked (I just throw an exception in the filter and I've also tried setting a breakpoint there in debug mode and neither get hit).
    My weblogic-pubsub contains the following:
    <wlps:message-filter>
    <wlps:message-filter-name>myFilter</wlps:message-filter-name>
    <wlps:message-filter-class>pubsubtest.filters.SecurityFilter</wlps:message-filter-class>
    </wlps:message-filter>
    <wlps:channel>
    <wlps:channel-pattern>/abc/**</wlps:channel-pattern>
    <wlps:jms-handler-name>abcJmsHandler</wlps:jms-handler-name>
         <wlps:message-filter>myFilter</wlps:message-filter>
    </wlps:channel>
    The class name is definitely correct because the app fails to publish entirely if it is not. I have the pubsub library referenced in my weblogic.xml and it works without the filter so that suggests that the pubsub server is deployed.
    Anyone have any ideas?
    -Shaun

    I'm not familiar with HTTP pub/sub.
    My one guess is that the server is attempting to deserialize an Object that's embedded within a JMS Object message, but the classpath is missing required classes in order to instantantiate the Object. In which case the solution is to ensure that the classpath includes any classes that might be embedded within the message object.
    If this doesn't help, can you post the full stack trace? The posted stack trace is truncated but the full trace should be in the log, as per the message "Truncated. see log file for complete stacktrace".
    Tom

  • OSB with request response MQ business service

    Hi,
    We have OSB webservice whice interacts with MQ via business service. We need to send the request to MQ request queue and get the response from the response queue.
    For this, we have configured a business with MQ transport, request-response is enabled, message id is set for the correlation, auto generate correlation value is chosen.
    The business service sends the message but unable receive the response from the response queue. Failing with the error message like
    The invocation resulted in an error: [WliSbTransports:381918]Failed to receive response, within the configured timeout, for request message with id 42454BD3E5F7647914544E793F9F0000013EC9DF03918057 and correlation id 42454BD3E5F7647914544E793F9F0000013EC9DF03918057.
    But we checked with the end system, the response is sent tot he response queue in no time. We also increased the time out but still same issue.
    We noticed that if we dont send the message id, we are getting the response but not response of the request sent but some other response.
    Please suggest what needs to be done to fix the issue.

    Open your business service and navigate to HTTP Transport configuration page and check what is the http type is enabled.
    Look to me its with GET method, change it to POST and re-try.
    If the above solution is not helping, try to check the Follow HTTP redirects check box below the Advanced Setting in same page.
    Thanks,
    Vijay

  • Asynchronous Publish Subscribe with Session.Client_Acknowledge

    Is it possible to do Asynchronous Publish Subscribe with Session.Client_Acknowledge in JMS? If no, then is there any way to acknowledge each message in an Asynchronous Publish Subscribe application?
    Any code samples will be helpful..
    Thanks in Advance,
    Jo

    CLIENT_ACKNOWLEDGE does work in asynchronous mode.
    I am using Sonic MQ. The sending session is created with CLIENT_ACKNOWLEDGE, in my onMessage(), I am testing the acknowledgement as:
    if ( 1 == 2) msg.acknowledge();
    else {
    Thread.sleep(1000);
    sendsession.recover();
    Since the condition is never true, the message is never acknowledged by the receiver and stays in the queue all the time.
    The confusing point: If you don't call the recover() function and your receiver is running, there would be no more messages to consume. As for SonicMQ, refreshing the Explorer will also show the number of messages in the queue is 0. However, if you Ctrl-C your receiver or call the sendsession.recover(), then you'll find out that the messsages are still in the queue by running the receiving program again or refreshing the queue.
    However, the behavior of this may be vendor-dependent. I am just happy that Sonic MQ is doing what I expect.

  • Publish subscribe with XI

    How do u do publish subscribe with XI? I dont see that in XI as opposed to webMethods or TIBCO. Any thoughts?
    gayatri

    Hi,
    To my knowledge XI dose'nt work on the principle of Publish and Subscribe. XI is Message Driven rather then Event driven. But still we can make even driven message processing but that dose'nt fall under Publish and Subscribe.
    Regards,
    Prakash

  • Publish subscribe model with plsql

    Hi,
    I did not find any sample that shows how to use the publish subscribe model with plsql.
    Enqueueing is possible and know how to do it, but how can I subscribe to a topic with plsql.
    All samples I found are for Java JMS.
    Thanks
    Günther

    Hello,
    I have assumed you are using 10.2
    There are examples in
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/toc.htm
    about using multi-consumer queues/topics. There are demos in $ORACLE_HOME/rdbms/demo if you have installed the companion cd.
    Thanks
    Peter

  • Correlation with request response port

    I created a correlation type and correlation set on the behalf of File.ReceivedFilName context property.
    I am getting the initializing correlation set property in the send port as follows:
    But in Receive Port I am not getting the Following correlation sets property as follows:
    Why this is occuring ?
    Am I doing something wrong ?
    Is correlation supports with request response  port ?
    Prakash

    Hi Prakash,
    When you drop the Receive shape in your Orchestration, you would see both the “Initializing Correlation Set” and “Following Correlation Set” properties for the Receive Shape (same case for the Send Shape).
     When you have linked the Receive Shape to the Request-Response port in your Orchestration (Request-Response port whose Port direction of communication is set to “I’ll be sending a request and receiving a response” property), the “Following
    Correlation Set” property for the Receive Shape disappears (same case for the send shape). Because you have connected the send/Receive shape to the two send port and BizTalk can in turn handle the correlation. You don’t need to specify the correlation set
    properties explicitly. These properties need to be configured only when you configure your send/Receive shape to one-way ports where you need to instruct BizTalk on how to handle the correlation not when you configure send/Receive shape to two way send port.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Failed to send request/response to peer. send() failed with error code 32?

    hello, chris:
    recently we check the tterros.log, we found the following erros:
    2009-11-12 09:48:18.41 Err : REP: 893538: OCEDATA:transmitter.c(5762): TT16059: Failed to send request/response to peer. send() failed with error code 32
    2009-11-12 09:48:18.41 Err : REP: 893538: OCEDATA:transmitter.c(3048): TT16121: Failed to flush transaction queue. Restarting log read loop
    2009-11-12 12:08:14.19 Err : REP: 893538: OCEDATA:transmitter.c(5762): TT16059: Failed to send request/response to peer. send() failed with error code 32
    2009-11-12 12:08:14.19 Err : REP: 893538: OCEDATA:transmitter.c(3048): TT16121: Failed to flush transaction queue. Restarting log read loop
    what does these mean?? Does this have any effect on replication?? thank you ...

    These messages indicate a loss of connectivity between the replication agents. This could be due to one some kind of failure (e.g. network issue). If the messages are infrequent and replication is otherwise working okay they are not a big cause for concern though if I were you I would check the network etc. for anything abnormal.
    Chris

  • Query to find the request group associated with a responsibility

    Hi All,
    I have to attach a report to around 30 responsibilities. For this I will have to find the request group for each responsibility and then add the Concurrent Program for the report in the corresponding request group.
    Can anyone help me with a query to find the request group associated with a responsibility.
    Regards,
    SK

    Just to add to the query above, if you want to see request group along with request_group_id you do join as follows
    SELECT frv.responsibility_name
    ,frg.request_group_name
    FROM fnd_request_groups frg,
    fnd_request_group_units frgu,
    fnd_responsibility_vl frv
    WHERE 1 = 1
    AND frgu.request_group_id = frg.request_group_id
    AND frv.request_group_id = frg.request_group_id
    ORDER BY responsibility_name
    Thanks
    Shailendra

  • Request-response topic questions

    Hi all,
    I'd like to know if the following is possible:
    � Could I configure a request-response topic having several subscribers?
    � If the answer to the last question is affirmative, could I configure a selector (a filter) on those subscribers to get a response only from one of them? (i know i could use directly a queue to receive a synchronous response from a determined destination, but my doubt is related with topics)
    � if the answer is affirmative again. What happens if several subscribers respond to a message?
    Thanks in advance

    Comments bellow:
    1. Yes
    2. Subscribers define their filters. I do not know if you could defined this on the system as administrator
    I don't understand the last phrase, could you give more details? I'll try to explain question 2 again to make sure i am understood (english is not my native language).
    - Suppose I have several subscribers for a determined topic, each with its own filter.
    - Suppose I send a message on that topic.
    - Suppose only one of the subscribers receives the message (its selector doesn't filter the message)
    - This subscriber responds, and I receive a response from it.
    - The rest of the subscribers doesn't receive any response at all.
    Could you confirm this steps?
    3. Each subscriber receives all the responses including his own response as long as he listen to this topic
    According to this point, my affirmation "The rest of the subscribers doesn't receive any response at all." is false +, isn't it?. Why each subscriber receives all the responses? That would only happen if the response is+
    published on the topic, am I right? I'm newbie at JMS Technology, please be patience".
    Thanks for your time.

  • XControl publish subscribe?

    Hi all
    I'm trying to implement a publish subscribe messaging pattern using XControls and LVOOP.
    I have various XControls which represent different views of the state of an object.
    I want all my XControl (clients) to be updated when the object (publisher) changes its state.
    I've achieved this sort of functionality before using VI's running in sub-panels that wait on a user event created by the publisher.
    I gather dynamic events are not available with XControls, so have tried to create a list of XControl clients that could be notified by a XControl method call.
    I've found a way of notifying individual clients by creating a method that fires the Display State ability but really want to manage all the XControls as a collection.
    An array can't seem to store references for the XControls as each is a different type.
    I've also tried using a Data Value Reference for each XControl reference hoping that this generic type could be stored in an array but no joy.
    The only way I've found is for the main vi to register for the publisher user event and then call the notification method of each XControl explicitly.  This messes up the main vi and is not an elegant solution.
    Does anyone know a way of achieving my desired functionality?
    Thanks in advance for any responses!
    Phill
    Solved!
    Go to Solution.

    Thanks tst
    I have attached a little sample of what I thought might be nice.
    I am building a P&I diagram out of DSC elements.
    The valve will ultimatly get more properties like OPC tags, names etc.
    I thought to attach the pipes to it so they get automatically activated, when the valve turns on.
    But I guess that would require some extra programming anyway because there will be two endpoints on the sides of the pipe to control a flow.
    Casting to more generic, even only a control, is obviously not possible. 
    Hierarchy for Xctrl is also not provided, no inheritence.
    Is there any another way to have a class with a Control style FP ?
    I am still at the beginning of the project so I have more options to think of......
    Gabi
    7.1 -- 2013
    CLA
    Attachments:
    Valve.zip ‏149 KB

  • Best way to implement request-response and still reliability

              HI,
              what is the best way to implement a request -response paradigm and still have
              the reliability that message will be 100% processed and give response...do i need
              to create the permanant queues with storage..
              anybody gives suggestions..
              Akhil
              

    Hi Akhil,
              Temporary destinations can only store non-persistent messages
              as per JMS spec - so they are not useful for reliable for holding
              responses that must survive longer than the life of the
              interested client. For persistence, you will need to use configured
              queues or durable subscriptions. For detailed
              discussion of request/response, I suggest reading the "WebLogic JMS
              Performance Guide" white-paper on dev2dev.bea.com. If you
              have many clients, or expect large message back-logs,
              there can be a performance impact when using selectors...
              FYI: There is a new pub/sub subscriber index enhancement
              that is available in 8.1 and
              in the latest service-packs for 6.1, 7.0.
              "Indexing Topic Subscriber Message Selectors To Optimize Performance"
              http://edocs.bea.com/wls/docs81/jms/implement.html#1294809
              This may be useful.
              Tom, BEA
              Akhil Nagpal wrote:
              > HI,
              > what is the best way to implement a request -response paradigm and still have
              > the reliability that message will be 100% processed and give response...do i need
              > to create the permanant queues with storage..
              >
              > anybody gives suggestions..
              > Akhil
              

  • Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class?

    I am trying to handle Producer not available situation in which I am using Interceptor IWSDLInterceptor in WLP 10.3.4. I am able to retrieve exception using onWSDLException but from here if I have to forward my pageURL object I need httpservlet request and response. I tried my own filter class to have its own customize request and also tried it out all other Interceptor to see if any one can handle IOException. I did manage to throw my own Customize exception but  that also did not work out as Page does not have any backing file or any supportive Controller class.
    Does any one implemented solution for httpservlet request/response object in IWSDLInterceptor implemented class? or do we have any specific documentation in regards to this? As I am not able to find much martial on IWSDLInterceptor except Java API from Oracle and article defining Two way SSL handshake Producer.
    Any kind of help is appreciated.
    Thanks
    PT

    Thanks Emmanuel for your response but render behavior is not available for IWSDLRequestContext/IWDSLResponseContext object which IWSDLInterceptor uses for implementation.
    Let me put my question in little simpler manner. May be my approach to the problem is not proper.
    Problem : Handle Producer Not available (no application exists on server) on consumer side.
    So far tried approach : Producer is not running then I am able to handle that TransportException at IInitCookieInterceptor/IHandleEventInterceptor onFault behaviour but in the case of Producer not even exists Consumer try to get WSDL fetch operation and failed with FileNotFoundException.
    To handle this exception, I used IWSDLInterceptor which is available under IWSDLInterceptor.OnWSDLException (Oracle Fusion Middleware Java API for Oracle WebLogic Portal)
    I am able to catch the exception but problem arise when application needs to forward at specific page/render portlet for this situation. For that it required request/response object but IWSDLInterceptor does not give any kind of instances to redirect request as there is no direct access to HTTPServlet request/response object.
    I tried my custom request object to use there. I tried out custom filter object of IWSDLrequestContext. nothing works.
    One approach works is to put producer WSDL file at consumer level. But in that, you need to handle different producer files for different environment. Which I don't think its a good approach.
    eAny one Let me know if my approach to the problem/scenario is wrong. Or if I am missing out any other supporting interface which also required to handle this scenario. or I am using wrong interface for this scenario.
    Thanks for your help in advance.
    PT.

Maybe you are looking for

  • UKM_TRANSFER_ITEMS periodically not working to rebuild committments!

    Reaching out to the SAP Community to find out if anyone has encountered the following problem: Program: UKM_TRANSFER_ITEMS is used to annually re-build FSCM commitment on accounts that get out of sync with SAP is currently NOT working. This transacti

  • How to install and use the Khmer unicode Khmer MEF1 and Khmer MEF2?

    How to install and use the Khmer unicode Khmer MEF1 and Khmer MEF2? from www.mef.gov.kh in the bottom of the page, you can get the unicode for the ms office

  • How display images stored in cell pohne with camera?

    Hi, I would like to display pictures taken by camera in cell phone. Example: I take picture by my camera in cell pohne and when I run my midlet I may watch all pictures from my camera? How API or package help me in this? How path may I write in midle

  • Yahoo Games Font un-readable

    Hey all, I have no idea what has happened to my safari but when I try to go to a yahoo games page, such as pool. I end up getting some weird font and the game is totally unplayable. how can I change the font that the safari uses while using java to I

  • Creating a 1 pt. border on a transparent background??

    I'm wondering if there is a simple way to create a 1 pt. border on my transparent background. I want this as a "cutting guide", but my "inside edit/stroke" is not working on the transparent b/g. Any help would be appreciated. Thanks!