{
checkClosed();
checkNotQueueSession();
if(!(topic instanceof TopicImpl))
{
throw new InvalidDestinationException("invalid destination " + topic);
}
final TopicSubscriberImpl messageConsumer;
synchronized(_session.getEndpoint().getLock())
{
messageConsumer = new TopicSubscriberImpl(name, true, (org.apache.qpid.amqp_1_0.jms.Topic) topic, this,