Messages

The following troubleshooting tips pertain to sending and receiving messages.

I am not receiving messages; I send messages, but I never receive them

Remember that you must start a connection before you can receive messages through it. When using the Java library, remember to call the start() method on the connection object. When using the REST API, remember to pass the HTTP header X-OC-Action: start to the connection resource.

I am unable to create a durable subscription or subscriber to a topic

Make sure that the client ID for the durable subscription is not being used by any of the following:

  • Another JMS connection created using the Java library

  • A connection created using the REST API

  • A message push listener

I am receiving an error stating that I am sending a message that is too large

Reduce the size of the message you are sending. Consider using Oracle Storage Cloud Service to store the large message content and send a reference to the stored content in a message. You may also opt to break the message into smaller pieces and use message properties or correlation IDs to indicate grouping.

Note:

For all service instances, the maximum size of a message is 512KB.

I am receiving an error stating that a destination has reached its limit of messages

If the destination is a queue, remove messages from the queue at a faster rate by adding more consumers, or slow the rate of sending.

If the destination is a topic, look for slow consumers.

Note:

You cannot purchase any additional queues, topics, or durable subscriptions for a given service instance. All service instances have a fixed limit of messaging resources. See About Resource Limits for the maximum number of resources in paid and trial service subscriptions.

I lost the HTTP cookie associated with a messaging context

Ensure that you store the JSESSIONID cookie in persistent storage for a high availability client. The messaging context and its associated connections, sessions, producers, consumers, queue browsers, and temporary destinations will remain open on the server until the messaging context expires.

Note:

If you lose the JSESSIONID cookie, you lose the ability to access the associated messaging context and all connections, sessions, producers, consumers, queue browsers, and temporary destinations created from it.

My messages are being redelivered

If you receive messages in a client-acknowledge mode session that are subsequently redelivered, be sure to acknowledge the messages (or, in the REST API, the session through which they were received).

If you receive messages in a transacted session that are subsequently redelivered, be sure to commit the session through which the messages were received.

Note:

If a client-acknowledge mode session or a transacted session is closed (or, in the REST API, has its messaging context expired), any messages received through that session that are unacknowledged or uncommitted will become available for redelivery.

My messages are not appearing at the target destination

If your message was sent through a transacted session, be sure to commit the session before the session expires or is closed, or the sent messages will be lost.

My messages are not being received by a consumer on a queue

Check if there is another consumer on the same queue, or a message push listener that is receiving messages from that queue. A message on a queue will only be delivered to one consumer.

I am receiving messages whose Content-Type does not match my client's Accept header

The REST API ignores the Accept header of requests to receive a message. Use message properties and selectors to ensure that you do not receive messages of a type your client cannot handle.

I am unable to use message selectors

Ensure that you are using the correct JMS selector syntax defined in the JMS specification. For the syntax of selectors, see the Message Selectors section of the Java API reference for the javax.jms.Message class.