Skip to content

Commit

Permalink
Changes done for v1.1.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
nysenthil committed Oct 4, 2023
1 parent 3594512 commit ab5551d
Show file tree
Hide file tree
Showing 17 changed files with 642 additions and 504 deletions.
6 changes: 6 additions & 0 deletions com.ibm.streamsx.websocket/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
Changes
=======
## v1.1.5:
* Oct/04/2023
* Added new logic in the HttpPost operator to retry PUT, POST or GET operation in case of an error.
* Added two HttpPost operator parameters to control retry: maxRetryAttempts, waitTimeBetweenRetry
* Upgraded the HTTP Client jar files from HTTPClient-4.5.12 to HTTPClient-4.5.14.

## v1.1.4:
* Mar/20/2023
* Made the second output port of the WebSocketSendReceive operator optional.
Expand Down
2 changes: 1 addition & 1 deletion com.ibm.streamsx.websocket/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

<path id="cp.manifest">
<fileset dir="opt">
<include name="HTTPClient-4.5.12/lib/*.jar"/>
<include name="HTTPClient-4.5.14/lib/*.jar"/>
</fileset>
</path>

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion com.ibm.streamsx.websocket/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<info:identity>
<info:name>com.ibm.streamsx.websocket</info:name>
<info:description>Provides C++ WebSocket source, analytic and sink operators</info:description>
<info:version>1.1.4</info:version>
<info:version>1.1.5</info:version>
<info:requiredProductVersion>4.2.1.0</info:requiredProductVersion>
</info:identity>
<info:dependencies/>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
==============================================
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2020
# Copyright IBM Corp. 2020, 2023
==============================================
*/

/*
==================================================================
First created on: Feb/13/2020
Last modified on: Aug/27/2020
Last modified on: Oct/04/2023

This main composite file contains the logic to send
a payload (plain text, JSON or XML) to a given HTTP(S) endpoint.
Expand Down Expand Up @@ -126,6 +126,14 @@ composite HttpPostTester {
// Do you want to create a persistent (Keep-Alive) HTTP connection?
expression<boolean> $createPersistentHttpConnection :
(boolean)getSubmissionTimeValue("createPersistentHttpConnection", "false");

// Do you want to retry PUT, POST or GET operation if it encounters an error?
expression<int32> $maxRetryAttempts :
(int32)getSubmissionTimeValue("maxRetryAttempts", "0");

// Do you want to wait between retry attempts for PUT, POST or GET operation?
expression<int32> $waitTimeBetweenRetry :
(int32)getSubmissionTimeValue("waitTimeBetweenRetry", "2000");

// What is the desired message rate we want to test with.
expression<float64> $maxMessageRate :
Expand Down Expand Up @@ -374,6 +382,12 @@ composite HttpPostTester {
// connection refused errors.
// A delay of 50 milliseconds between every HTTP POST is a good place to start.
delayBetweenConsecutiveHttpPosts: $delayBetweenConsecutiveHttpPosts;
//
// Do you want to retry PUT, POST or GET operation if it encounters an error?
maxRetryAttempts: $maxRetryAttempts;
//
// Do you want to wait between retry attempts for PUT, POST or GET operation?
waitTimeBetweenRetry: $waitTimeBetweenRetry;
}

// We can write the HTTP response somewhere or nowhere.
Expand Down Expand Up @@ -463,6 +477,12 @@ composite HttpPostTester {
// A delay of 10 milliseconds between every HTTP POST is a good place to start.
// Default is 0 for no delay. You may use it as needed.
delayBetweenConsecutiveHttpPosts: $delayBetweenConsecutiveHttpPosts;
//
// Do you want to retry PUT, POST or GET operation if it encounters an error?
maxRetryAttempts: $maxRetryAttempts;
//
// Do you want to wait between retry attempts for PUT, POST or GET operation?
waitTimeBetweenRetry: $waitTimeBetweenRetry;
}

// Let us write the HTTP text based response received from the remote server to a file.
Expand Down
4 changes: 2 additions & 2 deletions samples/HttpPostTester/etc/run-http-post-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
#--------------------------------------------------------------------
# First created on: Apr/23/2020
# Last modified on: Aug/31/2020
# Last modified on: Oct/04/2023
#
# This is a script that I used to test the HttpPost operator in
# our IBM Streams lab in New York. You can make minor changes here and
Expand Down Expand Up @@ -30,4 +30,4 @@ sleep 10

echo Starting the HttpPostTester.
# Start a Java based HTTP POST client application on instance i2
streamtool submitjob -d d1 -i i2 ~/workspace32/HttpPostTester/output/com.ibm.streamsx.websocket.sample.HttpPostTester.sab -P Url=http://b0513:8080/MyServices/Banking/Deposit -P NumSenders=1 -P createPersistentHttpConnection=true -P LogHttpPostActions=true -P MaxMessageRate=50.0 -P MessageBatchingTime=6.0 -P httpTimeout=30 -P delayBetweenConsecutiveHttpPosts=0 -P tlsAcceptAllCertificates=true
streamtool submitjob -d d1 -i i2 ~/workspace32/HttpPostTester/output/com.ibm.streamsx.websocket.sample.HttpPostTester.sab -P Url=http://b0513:8080/MyServices/Banking/Deposit -P NumSenders=1 -P createPersistentHttpConnection=true -P LogHttpPostActions=true -P MaxMessageRate=50.0 -P MessageBatchingTime=6.0 -P httpTimeout=30 -P delayBetweenConsecutiveHttpPosts=0 -P tlsAcceptAllCertificates=true -P maxRetryAttempts=5 -P waitTimeBetweenRetry=5000
2 changes: 1 addition & 1 deletion websocket-tech-brief.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
============================================================
First created on: February/22/2020
Last modified on: March/20/2023
Last modified on: October/04/2023

Purpose of this toolkit
-----------------------
Expand Down

0 comments on commit ab5551d

Please sign in to comment.