DiffusionJava clients use certificates to validate the security
of their connection to the Diffusion server. The client validates the
certificate sent by the Diffusion server against the set of certificates
trusted by the Java Development Kit (JDK).
If the certificate sent by the Diffusion server cannot be validated
against any certificates in the set trusted by the JDK, you receive an exception that contains the following message:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target.
Diffusion is authenticated using
the certificates provided by your certificate authority for the domain you host the Diffusion server on.
To ensure that the certificate is validated, set up a trust store for the client and
add the appropriate certificates to that trust store:
Obtain the appropriate intermediate certificate from the certificate authority.
Use keytool to create a trust store for your client that includes this
The Java client library invokes callbacks using a
thread from Diffusion thread pool. Callbacks for a
particular session are called in order, one at a time. Consider the following when
Do not sleep or call blocking operations in a callback. If you do so, other
pending callbacks for the session are delayed. If you must call a blocking
operation, schedule it in a separate application thread.
You can use the full Diffusion API to make other
requests to the server. If you want to make many requests based on a single
callback notification, be aware that Diffusion client
flow control is managed differently in callback threads. Less throttling is
applied and it is easier to overflow the servers by issuing many thousands of
requests. If you have a lot of requests to make, it is better to schedule the work
in an application thread.
The Java client uses the same regular expression
engine to the Diffusion server. Some regular expressions in topic
selectors are evaluated on the client and others on the Diffusion server.
There is no difference in how these regular expressions are evaluated in the Java client.