PubSub+ Messaging API for JCSMP Developer Guide
The PubSub+ JCSMP API (Java Client Shared Messaging Protocol) is a robust and high-performance API designed to enable Java applications to interact seamlessly with the PubSub+ event broker. The PubSub+ 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 PubSub+ JCSMP API:
Contexts
The PubSub+ JCSMP API uses processing contexts for organizing communication between an application and a PubSub+ 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 PubSub+ JCSMP API, see Creating Contexts in the PubSub+ 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 PubSub+ JCSMP API, see Creating Client Sessions in the PubSub+ 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 PubSub+ JCSMP API, see Creating Flows in the PubSub+ JCSMP API.
Other helpful links:
- Messaging API Concepts
- Supported Environments in the PubSub+ JCSMP API
- Managing Messages in the PubSub+ JCSMP API
- Publishing Direct Messages in the PubSub+ JCSMP API
- Publishing Guaranteed Messages in the PubSub+ JCSMP API
- Receiving Direct Messages in the PubSub+ JCSMP API
- Receiving Guaranteed Messages in the PubSub+ JCSMP API