sxiao3 / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

sending asynchronous messages #89

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
when am trying to implement the ExecutorService to send asynchronous messages i 
am getting error response code from the operator 0x00000014 (message queue 
full), but when sending synchronously there is no problem

i am attaching the code am using, please check it and see if there are any 
problems.

we have a connection with 50 SMS/sec, i want to make the full capacity.

am using jsmpp-2.0.1 on centos 5

Original issue reported on code.google.com by msy...@gmail.com on 11 Nov 2010 at 10:00

Attachments:

GoogleCodeExporter commented 8 years ago
your quick response is highly appreciated, and if there is another way to send 
asynchronous messages other than this one, please send it to me.

regards

Original comment by msy...@gmail.com on 11 Nov 2010 at 10:02

GoogleCodeExporter commented 8 years ago
dear Uudashr, i read that you tested JSMPP and you have reached 3000-5000 sms 
per second, can you please list the code that you were using to reach that 
throughput

Original comment by msy...@gmail.com on 11 Nov 2010 at 11:26

GoogleCodeExporter commented 8 years ago
Hi,
I do create simulator thac actually did not process the message. In real smsc 
they might need to persist the message to database and send it to wireless 
network, so there are an extra effort on the real smsc.
That's why smsc send back "message queue full" because they cannot process all 
your messages very fast.
In other case some smsc have throttle control, so when your message submission 
exceed the limit, they'll send you back a throttle error response.
A way to avoid throttle error and message queue full, can use throttle on your 
side to control the speed if the message submission, let say 10 messages per 
second.
And also it would be better if youl also keep the outstanding messages let say 
10. Do not send another message if there are still 10 message haven't response 
yet, if it already become 9 then you fan continue to send only 1 message. 
(Remember, keep thenoutstanding messages to 10).

Original comment by uuda...@gmail.com on 11 Nov 2010 at 12:46

GoogleCodeExporter commented 8 years ago
thats exactly what am doing, as you can see in the attached code :
while (executerCounter >= 
Integer.parseInt(props.getProperty("numberOfAsynMessages"))){
try {
Thread.sleep(1000);
} catch (InterruptedException ex) { }}
when one of the messages return messageid i pass another message for sending, 
but i also keep getting the message queue full.

but if i keep it the old way which is send the message and wait for the 
messageid so i can send another i dont get that exception, and sometimtes in 
this case the sending and response on the message dont take much time and i can 
send more than 5 messages / sec, but when it is asynch. i get these exceptions.

did you take a look on the code i attached, do think there is something i 
missed? and can be fixed..

thanks alot for your quick response

Original comment by msy...@gmail.com on 11 Nov 2010 at 1:43

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hi, 

0x00000014 (message queue full)

Each account smpp have each queue sms in system, SMS will be in queue before it 
be delived to customer

You can ask operator to up thi value

Original comment by i...@sanmua.com on 2 Sep 2014 at 12:44