Receive Timeout on SMPP

1.5k Views Asked by At

Does anyone knows the reason or logic why the timeout setting on the receive method of OpenSMPP is always divisible by ten? This is based on my experience: when I set it to 5 seconds, the timeout becomes 10 seconds, and when I set it to 11 seconds, the timeout becomes 20 seconds.

I tried to look for an answer by going deep at the codes of open-smpp-3.0.1 but I couldn't find the logic where 1 second becomes 10 seconds. I hope someone here was able to figure out this one before.

Btw, my bind request is a Receiver, and my sync mode is synchronous.

1

There are 1 best solutions below

0
On

I think is the "Queue Wait Timeout". In the code says about this value:

"This timeout specifies for how long will go the receiving into wait if the PDU (expected or any) isn't in the pduQueue yet. After that the queue is probed again (etc.) until receiving timeout expires or the PDU is received".

The default value is 10 second, so, if timeout is 1 to 10 seconds only waits for the queue for 10 seconds but if you define a timeout for the receiver of 11 seconds it waits 2 times for the queue. This way the receiver waits for 20 seconds. You can modify this value calling after bindind this method:

sessionSmpp.getReceiver().setQueueWaitTimeout(milliseconds);