ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Chinthaka Suriarachchi (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (SANDESHA2-200) Sandesha2 retransmit only 4 messages with the correct time interval
Date Sun, 28 Feb 2010 07:31:05 GMT

     [ https://issues.apache.org/jira/browse/SANDESHA2-200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Amila Chinthaka Suriarachchi resolved SANDESHA2-200.
----------------------------------------------------

    Resolution: Not A Problem


NUMBER_OF_EAGER_RESENDS_ALLOWED = 3; //the number of msg resends until we slow down our pace
LAZY_RESEND_SCALE_FACTOR = 10; //lazy resends are 10 times slower than eager resends

Sandesha has the above two constants which increase the retransmission time after 3 messages
by the factor 10

> Sandesha2 retransmit only 4 messages with the correct time interval
> -------------------------------------------------------------------
>
>                 Key: SANDESHA2-200
>                 URL: https://issues.apache.org/jira/browse/SANDESHA2-200
>             Project: Sandesha2
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>            Priority: Critical
>
> I try to send the messages with the following client keeping a retransmit interval of
10s. 
> private void inOutAsyncClient1(){
>         try {
>             ConfigurationContext configurationContext =
>                     ConfigurationContextFactory.createConfigurationContextFromFileSystem(
>                             AXIS2_REPOSITORY_LOCATION, AXIS2_CLIENT_CONFIG_FILE);
>             ServiceClient serviceClient = new ServiceClient(configurationContext, null);
>             serviceClient.setTargetEPR(new EndpointReference("http://localhost:8088/axis2/services/TestInOutService"));
>             serviceClient.getOptions().setAction("urn:TestInOutOperation");
> 			serviceClient.getOptions().setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
> 			serviceClient.engageModule("sandesha2");
>             serviceClient.getOptions().setTimeOutInMilliSeconds(1000000);
>             // setting time outs as a policy
>             OMElement policyOMElement = getPolicyElement();
>             RMAssertionBuilder builder = new RMAssertionBuilder();
>             SandeshaPolicyBean sandeshaPolicyBean = (SandeshaPolicyBean) builder.build(policyOMElement,
null);
>             Parameter policyParam = new Parameter(Sandesha2Constants.SANDESHA_PROPERTY_BEAN,
sandeshaPolicyBean);
>             serviceClient.getAxisService().addParameter(policyParam);
> 			serviceClient.getOptions().setProperty(SandeshaClientConstants.LAST_MESSAGE, Constants.VALUE_TRUE);
> 			OMElement omElement = serviceClient.sendReceive(getTestOMElement("testElement"));
> 			System.out.println("OM Element ==> " + omElement.toString());
> 			try {
>                 System.out.println("Waiting thread to sleep");
>                 Thread.sleep(2000000);
>             } catch (InterruptedException e) {
>             }
> 		} catch (AxisFault axisFault) {
>             axisFault.printStackTrace();
>         }
>     }
>     private OMElement getPolicyElement() {
>         String policyString = "<sandesha2:RMAssertion xmlns:sandesha2=\"http://ws.apache.org/sandesha2/policy\">"
+
>                 "    <wsp:Policy xmlns:wsp=\"http://schemas.xmlsoap.org/ws/2004/09/policy\"
xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"
xmlns:wsrm=\"http://ws.apache.org/sandesha2/policy\" wsu:Id=\"RMPolicy\">\n" +
>                 "  <wsrm:AcknowledgementInterval>3000</wsrm:AcknowledgementInterval>\n"
+
>                 "  <wsrm:RetransmissionInterval>10000</wsrm:RetransmissionInterval>\n"
+
>                 "  <wsrm:MaximumRetransmissionCount>10</wsrm:MaximumRetransmissionCount>\n"
+
>                 "  <wsrm:ExponentialBackoff>false</wsrm:ExponentialBackoff>\n"
+
>                 "  <wsrm:InactivityTimeout>6000</wsrm:InactivityTimeout>\n"
+
>                 "  <wsrm:InactivityTimeoutMeasure>seconds</wsrm:InactivityTimeoutMeasure>\n"
+
>                 "  <wsrm:InvokeInOrder>true</wsrm:InvokeInOrder>\n" +
>                 "  <wsrm:MessageTypesToDrop>none</wsrm:MessageTypesToDrop>\n"
+
>                 "</wsp:Policy>\n" +
>                 "</sandesha2:RMAssertion>";
>         try {
>             XMLStreamReader xmlStreamReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(policyString.getBytes()));
>             StAXOMBuilder stAXOMBuilder = new StAXOMBuilder(xmlStreamReader);
>             return stAXOMBuilder.getDocumentElement();
>         } catch (XMLStreamException e) {
>             e.printStackTrace();
>         }
>         return null;
>     }
> Then  I ran the client without starting the server expecting sandesha2 to retransmit
the message at 10s intervals.
> However these are the intervals it retransmit the message.
> 18:09:59
> 18:10:09
> 18:10:19
> 18:10:29
> 18:12:09
> 18:13:50
> 18:15:30
> 18:17:10
> 18:18:50
> 18:20:30
> Upto 4 messages it retransmit correctly with 10s time gap. After that it takes 1:40 to
retransmit. From where this 1:40 comes from 
> have I missed any other parameter to set?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: sandesha-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: sandesha-dev-help@ws.apache.org


Mime
View raw message