Search code examples
wso2esbws-reliablemessagingwso2-esb

WSO2 ESB reliable messaging


I have tried this sample "https://docs.wso2.com/display/ESB470/Sample+102%3A+Reliable+Message+Exchange+with+Back-End+Server+Using+WS-ReliableMessaging+1.1", and unfortunaly I couldn't understand the config explained in this sample. the config is:

<definitions xmlns="http://ws.apache.org/ns/synapse">
<in>
    <RMSequence single="true" version="1.1"/>
    <send>
        <endpoint name="reliable">
        <address uri="http://localhost:9000/services/ReliableStockQuoteService">
        <enableRM/>
        <enableAddressing/>
            </address>
        </endpoint>
    </send>
</in>
<out>
    <header name="wsrm:SequenceAcknowledgement" action="remove"
            xmlns:wsrm="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
    <header name="wsrm:Sequence" action="remove"
            xmlns:wsrm="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
    <header name="wsrm:AckRequested" action="remove"
            xmlns:wsrm="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
    <send/>
</out>

There is no place that explain where to use this config. What is the definitions tag? What are in and out tags?

I have tried this proxy service to invoke a reliabl-messaging enabled backend.

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="reliableClient"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <RMSequence single="true" version="1.0"/>
         <send>
            <endpoint>
               <wsdl service="reliableBackEnd"
                     port="reliableBackEndHttpSoap11Endpoint"
                     uri="http://localhost:9763/services/reliableBackEnd?wsdl">
                  <enableAddressing/>
                  <enableRM/>
               </wsdl>
            </endpoint>
         </send>
      </inSequence>
      <outSequence>
         <header xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"
                 name="wsrm:SequenceAcknowledgement"
                 action="remove"/>
         <header xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"
                 name="wsrm:Sequence"
                 action="remove"/>
         <header xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm"
                 name="wsrm:AckRequested"
                 action="remove"/>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>

but it is getting time out. the backed is hosting in the same ESB 4.8.1, with default RM-Policy enabled.


Solution

  • @Reza,

    definitions tag is the root tag of the ESB synapse config. Under the definitions tag, all the synapse artifact related configs such as proxy services, sequences, and etc are included.

    Also regarding the sample you are referring,you are referring to an older version of 4.7.0 and make sure you have enabled nhttp transport. Instead of using the older version, I would like to suggest you use a newer version. Please refer [1], a nice article written by Buddhima.

    [a] https://buddhimawijeweera.wordpress.com/2015/09/05/reliable-messaging-with-wso2-esb/