Consuming Object Messages
For the connector to process object messages, it requires access to the classes that define the object payloads.
Assuming that your payload classes are in their own projects, and are packaged into their own JAR files, place these JAR files and their dependencies (if any) onto the connector’s CLASSPATH
, see Adding External Libraries.
-
It is recommended that these JAR files only contain the relevant payload classes to prevent any oddities.
-
In the JAR files, your class files must be archived in the same directory/classpath as the application that publishes them. For example, if the source application is publishing a message with payload type,
MySerializablePayload
, defined under classpathcom.sample.payload
, then when packaging the payload jar for the connector, theMySerializablePayload
class must still be accessible under thecom.sample.payload
classpath.Typically, build tools such as Maven or Gradle handle this archival process when packaging the JAR files.