About the REST APIs

Oracle Messaging Cloud Service lets you send and receive messages to/from queues, topics, and durable subscriptions.

The Oracle Cloud Messaging Service REST API v1 resources are modeled after Java Message Service (JMS).  Various objects used in JMS, such asQueue, Topic, Session, MessageProducer, MessageConsumer, and so on, are resources in the REST interface with a subset of the properties and methods in JMS.  In the REST interface, however, the resources corresponding to these objects are referred to by names supplied by the client, rather than as Java object references.  The scope of a name is the messaging context containing it, not the service instance as a whole.

APIs

Connections are necessary to send and receive messages between clients and Oracle Messaging Cloud Service.  A connection is the starting point for the resources needed for direct communication between clients and the messaging platform.

A client usually uses one connection for all of its sending and receiving operations, though a client can use multiple connections if desired.  Each instance of Oracle Messaging Cloud Service has a quota of concurrently used connections.  When an instance is using 100% of its connection quota, additional attempts to create new connections will fail.

A new connection is used in the following situations:

  • A connection is created through the REST API
  • A JMS connection is created through the Java library
  • A message push listener is created
.
View API Endpoints

Returns information about one or more durable subscriptions depending on the request parameters supplied.

View API Endpoints

Message Push Listeners (MPLs) are user-created resources that reside within an Oracle Messaging Cloud Service instance.  An MPL asynchronously receives messages from a queue, topic, or durable subscription and either sends the messages to another destination or pushes them to a user-defined URL as an HTTP request.

View API Endpoints

A messaging context is a container of ephemeral objects like connections, sessions, producers, consumers, temporary destinations, and queue browsers.

A messaging context is identified by the JSESSIONID cookie.  The only API specific to a messaging context is the API for getting and setting the maximum inactive interval (MII), which controls the expiration time of the messaging context.  When the messaging context expires, all ephemeral objects contained in it are closed and deleted, except temporary destinations created in another messaging context.  A temporary destination is closed only if the connection by which the temporary destination was created is closed.

Creation of a messaging context is an implicit operation.  It is created by the first access to the Oracle Messaging Cloud Service that passes authentication.

View API Endpoints

Queue browsers are used to look at messages on a queue without removing them.  A queue browser is created from a session.

A queue browser may be used to look at all the messages in a queue, or only those that match a message selector.  Note that if messages are sent to a queue after a browser on that queue is created, those messages may not be visible via the queue browser.

View API Endpoints
Queues are destinations to which messages may be sent that support point-to-point communication.
View API Endpoints

Clients receive messages by using a session to create a consumer.  A session can have multiple consumers.  Consumers persist until they are closed, or the session in which they were created is closed.

A consumer defines how messages are received from the service.  A consumer must specify the destination from which messages are received.

Optionally, consumers can specify a subset of messages to be received by giving a selector.  For the syntax of selectors, see the Message Selectors section of the Java API reference for the javax.jms.Message class at the URL: javax.jms.Messageclass.

View API Endpoints

Clients send messages by using a session to create a producer.  A session can have multiple producers.  Producers persist until they are closed, or the session in which they were created is closed.

A producer defines the default characteristics of messages sent through the producer.  A producer can specify the destination to which all messages are sent, how sent messages should be stored in the service, and how long sent messages are stored in the service before they expire.

View API Endpoints

A session must be created before messages can be sent or received.  Sessions allow message sends and receives to be grouped into atomic units, undone, or re-done.

A single connection can have multiple sessions.  Sessions persist until they are closed, or until the connection from which they were created is closed.

View API Endpoints

A temporary queue is a queue created for the duration of a connection.  Messages may only be consumed from a temporary queue through the connection through which it was created.

View API Endpoints

A temporary topic is a topic created for the duration of a connection.  Messages may only be consumed from a temporary topic through the connection through which it was created.

View API Endpoints
Topics are destinations to which messages may be sent that support publish/subscribe, one-to-many communication.
View API Endpoints
The Topology API allows a client to see all of the ephemeral objects (messaging contexts, connections, sessions, producers, consumers, queue browsers, and temporary destinations) currently in existence in a service instance.
View API Endpoints
The Usage API provides information about how much certain resources are being used by a service instance, and the maximum amount of such resources that the instance is allowed.
View API Endpoints

You can view a list of all REST Endpoints.