WebLogic Messaging API Class Library |

# ISession.Unsubscribe Method

Unsubscribes a durable subscription that has been created by a client.

This method deletes the state being maintained on behalf of the subscriber by the JMS system.

It is erroneous for a client to Delete a durable subscription while there is an active `IMessageConsumer` for the subscription, or while a consumed message is part of a pending transaction or has not been acknowledged in the session.

void Unsubscribe(
String name
);

#### Parameters

String
  the name used to identify this subscription

#### Exceptions

Exception Type | Condition
--- | ---
MessageException | if the session fails to Unsubscribe to the durable subscription due to some internal error.
InvalidDestinationException | if an invalid subscription name is specified.

#### See Also

ISession Interface | WebLogic.Messaging Namespace