public class SolTopicPublisher extends SolMessageProducer implements TopicPublisher
Encoder| Modifier and Type | Method and Description |
|---|---|
Topic |
getTopic()
Gets the topic associated with this
TopicPublisher. |
void |
publish(Message message)
Publishes a message to the topic.
|
void |
publish(Message message,
int deliveryMode,
int priority,
long timeToLive)
Publishes a message to the topic, specifying delivery mode,
priority, and time to live.
|
void |
publish(Topic topic,
Message message)
Publishes a message to a topic for an unidentified message producer.
|
void |
publish(Topic topic,
Message message,
int deliveryMode,
int priority,
long timeToLive)
Publishes a message to a topic for an unidentified message
producer, specifying delivery mode, priority and time to live.
|
cancel, close, deliverToOne, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, isDMQEligible, isElidingEligible, isReplyMessage, isXMLPayload, send, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setProducerEventListener, setTimeToLive, useDirectMessagingequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getDeliveryMode, getDestination, getDisableMessageID, getDisableMessageTimestamp, getPriority, getTimeToLive, send, send, send, send, setDeliveryMode, setDisableMessageID, setDisableMessageTimestamp, setPriority, setTimeToLivepublic Topic getTopic() throws JMSException
TopicPublisherTopicPublisher.getTopic in interface TopicPublisherJMSException - if the JMS provider fails to get the topic for
this TopicPublisher
due to some internal error.public void publish(Message message) throws JMSException
TopicPublisherTopicPublisher's default delivery mode, priority,
and time to live.
When sending non-persistent messages, notifications of quota, permission, or endpoint problems will occur by sending an exception asynchronously through the Connection's ExceptionListener. In this case the send API will return without error but the message will not have been accepted. When sending persistent messages, the send API will always throw an exception when messages are not accepted.
publish in interface TopicPublishermessage - the message to publishJMSException - if the JMS provider fails to publish the message
due to some internal error.MessageFormatException - if an invalid message is specified.InvalidDestinationException - if a client uses this method
with a TopicPublisher with
an invalid topic.MessageProducer.getDeliveryMode(),
MessageProducer.getTimeToLive(),
MessageProducer.getPriority()public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
TopicPublisherWhen sending non-persistent messages, notifications of quota, permission, or endpoint problems will occur by sending an exception asynchronously through the Connection's ExceptionListener. In this case the send API will return without error but the message will not have been accepted. When sending persistent messages, the send API will always throw an exception when messages are not accepted.
publish in interface TopicPublishermessage - the message to publishdeliveryMode - the delivery mode to usepriority - the priority for this messagetimeToLive - the message's lifetime (in milliseconds)
Supported since 4.6.1 SolOS-TRJMSException - if the JMS provider fails to publish the message
due to some internal error.MessageFormatException - if an invalid message is specified.InvalidDestinationException - if a client uses this method
with a TopicPublisher with
an invalid topic.public void publish(Topic topic, Message message) throws JMSException
TopicPublisherTopicPublisher's default delivery mode,
priority, and time to live.
Typically, a message producer is assigned a topic at creation time; however, the JMS API also supports unidentified message producers, which require that the topic be supplied every time a message is published.
When sending non-persistent messages, notifications of quota, permission, or endpoint problems will occur by sending an exception asynchronously through the Connection's ExceptionListener. In this case the send API will return without error but the message will not have been accepted. When sending persistent messages, the send API will always throw an exception when messages are not accepted.
publish in interface TopicPublishertopic - the topic to publish this message tomessage - the message to publishJMSException - if the JMS provider fails to publish the message
due to some internal error.MessageFormatException - if an invalid message is specified.InvalidDestinationException - if a client uses
this method with an invalid topic.MessageProducer.getDeliveryMode(),
MessageProducer.getTimeToLive(),
MessageProducer.getPriority()public void publish(Topic topic, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
TopicPublisherTypically, a message producer is assigned a topic at creation time; however, the JMS API also supports unidentified message producers, which require that the topic be supplied every time a message is published.
When sending non-persistent messages, notifications of quota, permission, or endpoint problems will occur by sending an exception asynchronously through the Connection's ExceptionListener. In this case the send API will return without error but the message will not have been accepted. When sending persistent messages, the send API will always throw an exception when messages are not accepted.
publish in interface TopicPublishertopic - the topic to publish this message tomessage - the message to publishdeliveryMode - the delivery mode to usepriority - the priority for this messagetimeToLive - the message's lifetime (in milliseconds)
Supported since 4.6.1 SolOS-TRJMSException - if the JMS provider fails to publish the message
due to some internal error.MessageFormatException - if an invalid message is specified.InvalidDestinationException - if a client uses
this method with an invalid topic.Copyright 2004-2019 Solace Corporation. All rights reserved.