- The AppServer asynchronous request mechanism is not intended to be a message queuing mechanism. If the goal is to build an architecture where an application can queue up a bunch of requests and then go away while those requests are running, there are a few options:
- Use SonicMQ: This is exactly what it is designed for.
- Send a bunch of requests to an AppServer for which a disconnect procedure is already registered:
- In the AppServer, business logic queues up the requests in some application-specific way. For example, put them in a temp table or a database. When the client disconnects, fetch requests from wherever they are queued and run them in the disconnect procedure. NOTE: This requires a state-aware or state-reset AppServer to make this work. In these modes, the disconnect procedure runs after the end-user is disconnected from the AppServer. In stateless mode, the disconnect procedure runs before the client is actually disconnected from the AppServer.
- Build some peer-to-peer model (not using AppServer) where the messages are sent to a peer using an application-specific protocol:
- For example, use a database as a message queue or send messages using sockets. Both of these types of models have been used by some Progress ISVs.
- It is not possible to execute synchronous requests if there is an asynchronous request outstanding on the same appserver. Attempting to do this will result in error 9004:
- SERVER <name> has outstanding asynchronous requests. Cannot RUN. (9004)
- The appserver broker maintains an internal count that tells it how many asynchronous requests are outstanding, and it won't accept any other type of request until the count is zero. If it's necessary to run both synchronous and asynchronous requests on the same appserver simultaneously, then the requests will have to be made via separate appserver connections.
References to Written Documentation:
OpenEdge Application Server: Developing AppServer Applications