Collaboration of APC and AMC
The APC framework itself enables WebSocket communication with exactly one application server. If you want to uncouple communication from the current application server you can establish a connection over ABAP Messaging Channels (AMC).
To achieve this, a Push Channel can be connected to an AMC consumer for an AMC with appropriate message type. The Push Channel itself is implemented as APC handler class using the method BIND_AMC_MESSAGE_CONSUMER of the interface IF_APC_WSP_BINDING_MANAGER of a binding manager generated for this purpose. Then, the messges sent over this APC are handled as APC messages automatically.
The APC framework wraps the required methods of the AMC framework. The only prerequisite is that the APC handler class in the Messaging Channel used is authorized for binding consumers and sending messages.
You unbind the AMC consumer explicitely using the method UNBIND_AMC_MESSAGE_CONSUMER of the binding manager.