Seeks to a specified offset.

@param consumerGroupId
@param tpo
@return {@code true} if the consumer has subscribed to the specified
topic/partition, {@code false} otherwise.
@since 1.3.2
322200
public boolean seek(String consumerGroupId, KafkaTopicPartitionOffset tpo) {
        KafkaMsgConsumer consumer = getKafkaConsumer(consumerGroupId, false);
        return consumer.seek(tpo);
    }
26266
def _get_coordinator_for_group(self, consumer_group):
        
        if self.consumer_group_to_brokers.get(consumer_group) is None:
            yield self.load_consumer_metadata_for_group(consumer_group)

        returnValue(self.consumer_group_to_brokers.get(consumer_group))
700770
@Override
	public List<CPSpecificationOption> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
968123
public boolean removeMessageListener(String consumerGroupId, String topic,
            IKafkaMessageListener messageListener) {
        KafkaMsgConsumer kafkaConsumer = cacheConsumers.get(consumerGroupId);
        return kafkaConsumer != null ? kafkaConsumer.removeMessageListener(topic, messageListener)
                : false;
    }
1039343
public static boolean seek(KafkaConsumer<?, ?> consumer, KafkaTopicPartitionOffset tpo) {
        synchronized (consumer) {
            Set<TopicPartition> topicParts = consumer.assignment();
            if (topicParts != null) {
                for (TopicPartition tp : topicParts) {
                    if (StringUtils.equals(tpo.topic, tp.topic())
                            && tpo.partition == tp.partition()) {
                        consumer.seek(tp, tpo.offset);
                        // we want to seek as soon as possible
                        // since seekToEnd evaluates lazily, invoke position()
                        // so
                        // that seeking will be committed.
                        consumer.position(tp);
                        return true;
                    }
                }
            }
        }
        return false;
    }
1160900
private boolean consideringHierarchy(Publish p) {
		boolean sent = false;
		for (Entry<Class<?>, List<SubscriberParent>> e : p.mapping.entrySet()) {
			if (e.getKey().isAssignableFrom(p.message.getClass())) {
				for (SubscriberParent parent : e.getValue()) {
					if (!predicateApplies(parent.getSubscriber(), p.message)) {
						continue;
					}
					parent.getSubscriber().receiveO(p.message);
					sent = true;
				}
			}
		}
		return sent;
	}
201154
public static Map<String, List<String>> getConsumersPerTopic(ZkClient zkClient, String group) {
        ZkGroupDirs dirs = new ZkGroupDirs(group);
        List<String> consumers = getChildrenParentMayNotExist(zkClient, dirs.consumerRegistryDir);
        //
        Map<String, List<String>> consumersPerTopicMap = new HashMap<String, List<String>>();
        for (String consumer : consumers) {
            TopicCount topicCount = getTopicCount(zkClient, group, consumer);
            for (Map.Entry<String, Set<String>> e : topicCount.getConsumerThreadIdsPerTopic().entrySet()) {
                final String topic = e.getKey();
                for (String consumerThreadId : e.getValue()) {
                    List<String> list = consumersPerTopicMap.get(topic);
                    if (list == null) {
                        list = new ArrayList<String>();
                        consumersPerTopicMap.put(topic, list);
                    }
                    //
                    list.add(consumerThreadId);
                }
            }
        }
        //
        for (Map.Entry<String, List<String>> e : consumersPerTopicMap.entrySet()) {
            Collections.sort(e.getValue());
        }
        return consumersPerTopicMap;
    }
757306
@Override
	public List<CPOption> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
977610
@Override
	public List<CPRule> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
737623
@Override
    public synchronized long commit(long offset) {
        if (offset <= submittedOffset && offset > safeOffset) {
            int ggap = (int)Math.min(committedOffsets.length, offset-safeOffset);
            if (ggap == committedOffsets.length) {
                LOGGER.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS ,Level.WARN,
                        null, "CommitTracker moving topic commit point from %d to %d for topic "
                                + topic + " partition " + partition + " group:" + consumerGroup, safeOffset, (offset - committedOffsets.length + 1)
                        );
                safeOffset = offset - committedOffsets.length + 1;
                committedOffsets[idx(safeOffset)] = safeOffset;
            }
            committedOffsets[idx(offset)] = offset;
            while (ggap > 0 && committedOffsets[idx(safeOffset)]+1 == committedOffsets[idx(safeOffset+1)]) {
                ++safeOffset;
            }
            if (offerOffset >=0 && (offerOffset-safeOffset) < committedOffsets.length) {
                offerOffset = -1L;
                notify();
            }
        }

        if (offset == firstOffset) {
            firstOffsetCommitted = true;
        }
        return safeOffset;
    }
9183
private void _checkAndSubscribe(KafkaConsumer<?, ?> consumer, String topic) {
        synchronized (consumer) {
            Set<String> subscription = consumer.subscription();
            if (subscription == null || !subscription.contains(topic)) {
                consumer.subscribe(Arrays.asList(topic));
            }
        }
    }
333786
public boolean commmitAsync(KafkaMessage msg, String groupId) {
        KafkaMsgConsumer kafkaConsumer = cacheConsumers.get(groupId);
        return kafkaConsumer != null ? kafkaConsumer.commitAsync(msg) : false;
    }
763693
@Override
    public boolean suspendConsumer(int suspendFlag)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "suspendConsumer", Integer.valueOf(suspendFlag));

        boolean didSuspendConsumer;
        //  We can't hold the LCP lock before we hold the keyGroup lock and we don't want to
        // take the asynch lock as we'll block on a consumerMessage call but the keyGroup
        // is set inside the LCP and asynch locks and could therefore vanish between checking for it
        // and trying to lock it here. So we take a dirty read of the keyGroup and if we
        // got it we'll lock it. This does mean there are slight windows around setting
        // and unsetting of the keyGroup but the worst case is that we lock the group when
        // we didn't need to (as we're no longer a member of the group).
        JSKeyGroup cachedKeyGroup = _keyGroup;

        // We're a member of a group so we must lock it before we go for the LCP lock
        // and take the message
        if (cachedKeyGroup != null)
            cachedKeyGroup.lock();

        try
        {
            this.lock();
            try
            {
                if (!isConsumerSuspended(suspendFlag)) // Is the consumer already suspended
                {
                    _consumerSuspended = true;
                    _suspendFlags |= suspendFlag;
                    unsetReady();
                    didSuspendConsumer = true;
                }
                else
                {
                    didSuspendConsumer = false;
                }
            } finally
            {
                this.unlock();
            }
        } finally
        {
            if (cachedKeyGroup != null)
                cachedKeyGroup.unlock();
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "suspendConsumer", didSuspendConsumer);
        return didSuspendConsumer;
    }
344007
public static com.liferay.commerce.product.model.CPInstance getCPInstanceByUuidAndGroupId(
		String uuid, long groupId)
		throws com.liferay.portal.kernel.exception.PortalException {
		return getService().getCPInstanceByUuidAndGroupId(uuid, groupId);
	}
1221085
public static List<CommerceOrder> findByG_U_O(long groupId, long userId,
		int orderStatus) {
		return getPersistence().findByG_U_O(groupId, userId, orderStatus);
	}
847834
@Override
	public List<CommercePriceList> findByGroupId(long groupId) {
		return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);
	}
670135
@Override
	public CPInstance fetchCPInstanceByUuidAndGroupId(String uuid, long groupId) {
		return cpInstancePersistence.fetchByUUID_G(uuid, groupId);
	}