WebLogic Messaging API Class Library |

# ISession. Method

Creates an `IMessageConsumer` for the specified destination. Since `IQueue` and `ITopic` both inherit from `IDestination`, they can be used in the destination parameter to create an `IMessageConsumer`.

#### Overload List

Creates an `IMessageConsumer` for the specified destination. Since `IQueue` and `ITopic` both inherit from `IDestination`, they can be used in the destination parameter to create an `IMessageConsumer`.

> IMessageConsumer (IDestination);

Creates an `IMessageConsumer` for the specified destination, using a message selector. Since `IQueue` and `ITopic` both inherit from `IDestination`, they can be used in the destination parameter to create a `IMessageConsumer`. A client uses a `IMessageConsumer` object to receive messages that have been sent to a destination.

> IMessageConsumer (IDestination,String);

Creates `IMessageConsumer` for the specified destination, using a message selector. This method can specify whether messages published by its own connection should be delivered to it, if the destination is a topic. Since `IQueue` and `ITopic` both inherit from `IDestination`, they can be used in the destination parameter to create a `IMessageConsumer`. A client uses a `IMessageConsumer` object to receive messages that have been published to a destination. In some cases, a connection may both publish and subscribe to a topic. The consumer `NoLocal` attribute allows a consumer to inhibit the delivery of messages published by its own connection. The default value for this attribute is False. The `noLocal` value is supported by destinations that are topics.

> IMessageConsumer (IDestination,String,Boolean);

#### See Also

ISession Interface | WebLogic.Messaging Namespace