Contexts in the PubSub+ JCSMP API

The PubSub+ JCSMP API uses processing contexts for organizing communication between an application and a Solace Transform Processor event broker. Contexts act as containers in which sessions are created and session-related events can be handled.

A context encapsulates threads that drive network I/O and message delivery notification for the sessions and session components associated with that context. For JCSMP, one thread is used for I/O and another for notification. The life cycle of a Context‑owned thread is bound to the life cycle of the Context.

In the PubSub+ JCSMP API, the context interface is com.solacesystems.jcsmp.Context

The figure below shows the basic relationship between a Context and its dependent processing components.

Overview of Core Concepts