Unsubscribe to topic
@param topic
@param session
@return
549354
@JsTopic
	@WsDataService
	public Integer unsubscribe(@JsTopicName(prefix = Constants.Topic.SUBSCRIBERS) String topic, Session session) {
		return topicManager.unregisterTopicSession(topic, session);
	}
1173278
def unsubscribe_user_from_discussion(recID, uid):
    
    query = """DELETE FROM "cmtSUBSCRIPTION"
                     WHERE id_bibrec=%s AND id_user=%s"""
    params = (recID, uid)
    try:
        res = run_sql(query, params)
    except:
        return 0
    if res > 0:
        return 1
    return 0
1276678
private void deletePubsubTopic(String topic) throws IOException {
    if (pubsubClient == null) {
      pubsubClient = newPubsubClient(options.as(PubsubOptions.class)).build();
    }
    if (executeNullIfNotFound(pubsubClient.projects().topics().get(topic)) != null) {
      pubsubClient.projects().topics().delete(topic).execute();
    }
  }
35880
def remove(self, participant):
        
        for topic, participants in list(self._participants_by_topic.items()):
            self.unsubscribe(participant, topic)
            # It's possible that we just nixe the last subscriber.
            if not participants:  # IE, nobody is still listening at this topic.
                del self._participants_by_topic[topic]
83326
def detach_session(self):
        """"""
        if self._session is not None:
            self._session.unsubscribe(self)
            self._session = None
322163
def delete(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
    conn.delete_topic(get_arn(name, region, key, keyid, profile))
    log.info('Deleted SNS topic %s', name)
    _invalidate_cache()
    return True
782726
@Override
    public void unsubscribe(String subName) throws JMSRuntimeException, InvalidDestinationRuntimeException {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "unsubscribe", new Object[] { subName });
        try {
            jmsSession.unsubscribe(subName);
        } catch (InvalidDestinationException ide) {
            throw (InvalidDestinationRuntimeException) JmsErrorUtils.getJMS2Exception(ide, InvalidDestinationRuntimeException.class);
        } catch (JMSException jmse) {
            throw (JMSRuntimeException) JmsErrorUtils.getJMS2Exception(jmse, JMSRuntimeException.class);
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "unsubscribe");
        }
    }
630578
public void sessionDestroyed(final HttpSessionEvent event) {
		final HttpSession session = event.getSession();
		final String id = session.getId();
		SESSIONS.remove(id);
		counter--;
	}
237577
function unsubscribe(topicArn) {

        // if not subscribed then return now
        if (!subscriptions[topicArn]) {
            debug('Not subscribed to ' + topicArn);
            return Promise.resolve();
        }

        return new Promise(function(resolve, reject) {
            const params = { SubscriptionArn: topicArn };
            config.sns.unsubscribe(params, function (err) {
                debug('Unsubscribe from ' + topicArn + (err ? ' failed: ' + err.message : 'succeeded'));
                if (err) return reject(err);
                delete subscriptions[topicArn];
                resolve();
            });
        });
    }
611691
@Override
	public Collection<String> removeSessionToTopics(Session session) {
		if (session != null) {
			return removeSessionsToTopic(Arrays.asList(session));
//			for (String topic : map.keySet()) {
//				sendSubscriptionEvent(Constants.Topic.SUBSCRIBERS + Constants.Topic.COLON + topic, unregisterTopicSession(topic, session));
//			}
		}
		return Collections.EMPTY_LIST;
	}
341826
public static void close(Session session) {
		if (session != null && session.isConnected()) {
			session.disconnect();
		}
		JschSessionPool.INSTANCE.remove(session);
	}
638672
public final void unregisterSession( AbstractSession sessionToRemove )
    {
        if (sessions.remove(sessionToRemove.getId()) == null)
            log.warn("Unknown session : "+sessionToRemove);
    }
780685
public void remove(final boolean removeFromSession) {
        if (removeFromSession) {
            this.sessionStore.set(this.context, Pac4jConstants.USER_PROFILES, new LinkedHashMap<String, U>());
        }
        this.context.setRequestAttribute(Pac4jConstants.USER_PROFILES, new LinkedHashMap<String, U>());
    }
573107
@Override
    public void dispose(final Session session) {
        if (session != null && session.isConnected()) {
            logger.trace("Disposing of hibernate session.");
            session.close();
        }
    }
683106
def _del_all_subscriptions(self, session):
        
        filter_queue = deque()
        for topic in self._subscriptions:
            if self._del_subscription(topic, session):
                filter_queue.append(topic)
        for topic in filter_queue:
            if not self._subscriptions[topic]:
                del self._subscriptions[topic]
654070
public DeleteSessionResponse deleteSession(String sessionId) {
        DeleteSessionRequest request = new DeleteSessionRequest();
        request.setSessionId(sessionId);
        return deleteSession(request);
    }
902856
public void removeTopic(String topic)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "removeTopic", topic);

    if (_subscriptionState == null)
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        SibTr.debug(tc, "removeTopic", "Topic not found");
    }
    else
      _subscriptionState.removeTopic(topic);

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "removeTopic");
  }