Comments (4)
from cloudhopper-smpp.
Interesting issue. Can you connect to the SMSC outside of this java library? Perhaps there is a firewall in-between that is immediately closing the socket is why I ask. Can you successfully connect to the socket on the other side via telnet?
from cloudhopper-smpp.
I have noticed this when the library is used in the context of a Proxy (i.e. providing simultaneously a server and client interface). Specifically, I ran into this problem when an underlying thread receives a packet say from a server session, and attempts to send the PDU out via a "client" SmppSession. This behaviour stopped when I inserted a thread-pool + queue between the two (i.e. PDU path: Remote Client -> Server Class -> Queue+ThreadPool -> Client Class -> Remote Server). I needed the queue de-coupling so I didn't look too deeply into why this was occurring, but my feeling was that there is a resource sharing issue in either cloudhopper-smpp or netty.
from cloudhopper-smpp.
Yes, your proxy example is true. NIO/netty is always difficult to engineer with since you need to be aware of the context of which thread is calling a method. The methods called upon reception of a PDU (either in a server or client session) are being called with a thread from the thread pool used by NIO/netty. Netty throws an IllegalStateException if that "receiving" thread is also now "sending" a PDU as well. Your solution of adding an intermediate queue + thread will get rid of the exception.
This isn't documented very well in the library -- but one must be pretty careful about handling PDUs as quickly as possible in any method that "receives" a PDU. Sending a PDU from that same thread context will trigger an exception from Netty, but actually any long blocking operation will significantly slow down performance as well. Those "receiving" threads from Netty are used to process incoming data from the socket pool -- and in order to maximize performance overall, its very important they are processed as fast as possible. I'd probably recommend always immediately throwing those PDUs into a queue and processing them with another thread.
from cloudhopper-smpp.
Related Issues (20)
- Link SmppSession and SmppSessionHandler
- Threads get stuck at DefaultSmppSession.sendRequestPd:530 HOT 5
- Threads get stuck at DefaultSmppClient.createConnectedChannel HOT 1
- Receiving SmppChannelException while the SMSC is still sending response HOT 2
- Character Coding issue -Special Characters received as "?" HOT 3
- How I should receive multipart messages? HOT 2
- Is it possible to send messages to SMSC using one Smppsession (or a session that lasts long )because binding & unbinding for every single msg has resulted in creating large number of bind requests at SMSC . Due to this load ,SMSC is failing to receive bind requests and we are receiving the error "com.cloudhopper.smpp.type.SmppTimeoutException: Unable to get response within [3000 ms]" HOT 1
- Adding support sumbit_multi operation
- DeliverSmResp is very slow HOT 2
- Send message to a connected client HOT 1
- Sending Delivery Back to connected client later HOT 1
- Problem connecting to operator "Swisscom"(a swiss mobile operator) HOT 1
- .Net Port?
- how to get the src ip from submit_sm HOT 2
- EnquireLink, SmppTimeoutException
- Getting No request found for PDUHeader from JSMPP library
- How to get DLR from SMSC setting error code
- Cloudhopper SMPP Error codes
- Need to know isUCS2 message. We have GSMCharset.canRepresent(str). Similarly do we have it for UCS messages
- Not able to get the full delivery report on the client side including delivery error code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudhopper-smpp.