This is a suggestion for the configuration of the SimplePush WildFly subsystem (AGPUSH-242). Note that this includes all configurable options and we will provide resonable defaults so that all are not required.
<subsystem xmlns="urn:org.jboss.aerogear.simplepush:1.0">
<server
socket-binding="simplepush-socket-binding"
datasource-jndi-name="java:jboss/datasources/SimplePushDS"
token-key="936agbbhh6ee99=999333"
useragent-reaper-timeout="604800000"
notification-prefix="update"
notification-tls="true"
notification-ack-interval="60000"
notification-socket-binding="simplepush-notify"
sockjs-prefix="simplepush"
sockjs-cookies-needed="true"
sockjs-url="http://cdn.sockjs.org/sockjs-0.3.4.min.js"
sockjs-session-timeout="5000"
sockjs-heartbeat-interval="25000"
sockjs-max-streaming-bytes-size="131072"
sockjs-tls="false"
sockjs-keystore="/simplepush.keystore"
sockjs-keystore-password="password"
sockjs-websocket-enabled="true"
sockjs-heartbeat-interval="18000"
sockjs-protocols="push-notification"
</server>
</subsystem>
This is the name of a socket-binding configured in the socket-binding-group section in a WildFly configuration xml file.
This referes to a JNDI name of a datasource that configured and bound. The datasource would normally be configured in the same WildFly configuration xml file.
This should be a random token which will be used by the server for encryption/decryption of the endpoint URLs that are returned to clients upon successful channel registration.
This is the amount of time which a UserAgent can be inactive after which it will be removed from the system.
The prefix for the the notification endpoint url. This prefix will be included in the endpointUrl returned to the client to enabling them to send notifications.
Configures Transport Layer Security (TLS) for the notification endpointUrl that is returned when a UserAgent/client registers a channel. Setting this to true will return a url with https as the protocol.
This is the interval time for resending un-acknowledged notifications.
This is the name of a socket-binding configured in the socket-binding-group section in a WildFly configuration xml file. This information to configure the host and port that will be returned as the notification endpoints that backend servers can use to send notifications to a channel. The configuration for this socket-binding could look like this:
<interfaces>
<interface name="external">
<inet-address value="domain1.com"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="simplepush" port="7777"/>
<socket-binding name="simplepush-notification" interface="external" port="7777"/>
</socket-binding-group>
AeroGear SimplePush Server uses the SockJS protocol to enable fallback handling for environments where WebSocket support my be limited. This can be cause with older browsers or where restrictive proxies are in play.
The prefix/name, of the SockJS service. For example, in the url "http://localhost/simplepush/111/12345/xhr", 'simplepush' is the prefix.
This is used by some load balancers to enable session stickyness.
The url to the sock-js-.json. This is used by the 'iframe' protocol and the url is replaced in the script returned to the client. This allows for configuring the version of sockjs used. By default it is 'http://cdn.sockjs.org/sockjs-0.3.4.min.js'.
A timeout for inactive sessions.
Specifies a heartbeat interval.
The max number of types that a streaming transport protocol should allow to be returned before closing the connection, forcing the client to reconnect. This is done so that the responseText in the XHR Object will not grow and be come an issue for the client. Instead, by forcing a reconnect the client will create a new XHR object and this can be see as a form of garbage collection.
Specified whether Transport Layer Security (TLS) should be used by the SockJS layer.
If tls is in use then the value of this property should be a path to keystore available on the classpath of the subystem.
If tls is in use, then the value of this property should be the password to the keystore specified in keystore.
Determines whether WebSocket support is enabled on the server.
A heartbeat-interval for WebSockets. This interval is separate from the normal SockJS heartbeat-interval and might be required in certain environments where idle connection are closed by a proxy. It is a separate value from the hearbeat that the streaming protocols use as it is often desirable to have a much larger value for it.
Adds the given protocols which will be returned to during the Http upgrade request as the header 'WebSocket-Protocol'. This is only used with raw WebSockets ad the SockJS protocol does not support protocols to be specified by the client yet.
for external-host / external-port you could use outbound-socket-binding functionality, which is essentially same thing as socket-binding but for outgoing connections.