public interface TopicConnection
extends Connection
Subinterfaces: XATopicConnection
WebSphere MQ class: MQTopicConnection
java.lang.Object
|
+----com.ibm.mq.jms.MQConnection
|
+----com.ibm.mq.jms.MQTopicConnection
|
A TopicConnection is an active connection to a JMS Publish/Subscribe
provider.
See also: Connection, TopicConnectionFactory,
and XATopicConnection
- createConnectionConsumer
-
public ConnectionConsumer createConnectionConsumer
(Topic topic,
java.lang.String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
Create a connection consumer for this connection. This is an expert
facility that is not used by regular JMS clients.
WebSphere MQ Event Broker note |
---|
For a direct connection to WebSphere MQ Event Broker, if transact is true
then this method throws a JMSException. |
- Parameters:
-
- topic - the topic to access.
- messageSelector - only messages with properties that match the message
selector expression are delivered.
- sessionPool - the server session pool to associate with this connection
consumer.
- maxMessages - the maximum number of messages that can be assigned to a
server session at one time.
- Returns:
- the connection consumer.
- Throws:
-
- JMSException - if the JMS Connection fails to create a connection consumer
because of an internal error, or because of incorrect arguments for
sessionPool.
- InvalidSelectorException - if the message selector is not valid.
- See also:
- ConnectionConsumer
- createDurableConnectionConsumer
-
public ConnectionConsumer createDurableConnectionConsumer
(Topic topic,
java.lang.String subscriptionName
java.lang.String messageSelector,
ServerSessionPool sessionPool,
int maxMessages)
throws JMSException
Create a durable connection consumer for this connection. This is an
expert facility that is not used by regular JMS clients.
WebSphere MQ Event Broker note |
---|
For a direct connection to WebSphere MQ Event Broker, this method throws a
JMSException. |
- Parameters:
-
- topic - the topic to access.
- subscriptionName - name of the durable subscription.
- messageSelector - only messages with properties that match the message
selector expression are delivered.
- sessionPool - the server session pool to associate with this durable
connection consumer.
- maxMessages - the maximum number of messages that can be assigned to a
server session at one time.
- Returns:
- the durable connection consumer.
- Throws:
-
- JMSException - if the JMS Connection fails to create a connection consumer
because of an internal error, or because of incorrect arguments for
sessionPool and messageSelector.
- InvalidSelectorException - if the message selector is not valid.
- See also:
- ConnectionConsumer
- createTopicSession
-
public TopicSession createTopicSession(boolean transacted,
int acknowledgeMode)
throws JMSException
Create a TopicSession.
WebSphere MQ Event Broker note |
---|
For a direct connection to WebSphere MQ Event Broker, if transact is true
then this method throws a JMSException. |
- Parameters:
-
- Returns:
- a newly created topic session.
- Throws:
- JMSException - if JMS Connection fails to create a session because of an
internal error, or a lack of support for the specific transaction and
acknowledgement mode.
© IBM Corporation 1997, 2002. All Rights Reserved