Solace Messaging API for JCSMP Developer Guide

The Solace JCSMP API (Java Client Shared Messaging Protocol) is a robust and high-performance API designed to enable Java applications to interact seamlessly with the Solace event broker. The Solace JCSMP API provides comprehensive support for message exchange patterns such as point-to-point, publish-subscribe, and request-reply, offering advanced messaging features to handle high-throughput, low-latency environments.

To get you started, here is a brief overview of some of the key messaging concepts used in the Solace JCSMP API:

Contexts

The Solace JCSMP API uses processing contexts for organizing communication between an application and a Solace event broker. Contexts act as containers in which zero or more 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. The life cycle of a context‑owned thread is bound to the life cycle of the context.

A session can have zero or more:

  • flows

  • cache sessions

  • browsers

For more information on contexts in the Solace JCSMP API, see Creating Contexts in the Solace JCSMP API.

Sessions

A session creates a single, client connection to an event broker for sending and receiving messages. Sessions also allow applications to add and remove subscriptions.

A client can:

  • bind to endpoints to attract matching guaranteed messages (queues or topic endpoints).

  • publish messages to destinations (topics or queues).

  • add and remove subscriptions that attract messages with matching topics (topics). Subscriptions are also assigned to topic endpoints and optionally queue endpoints.

For more information on sessions in the Solace JCSMP API, see Creating Client Sessions in the Solace JCSMP API.

Flows

A consumer flow is an API object that allows applications to receive guaranteed messages from an endpoint, such as a Queue. It is created by a session.

For more information on flows in the Solace JCSMP API, see Creating Flows in the Solace JCSMP API.

Other helpful links: