apache/druid · error · UnsupportedOperationException

getPosition() is not supported in RabbitMQ streams

Error message

getPosition() is not supported in RabbitMQ streams

What it means

RabbitStreamRecordSupplier.getPosition is intentionally unsupported: RabbitMQ streams (unlike Kafka) do not expose a consumer position in the way Druid's RecordSupplier API expects. Calling this method is always a programming/configuration error — code using this supplier must rely on getLatestSequenceNumber/getEarliestSequenceNumber instead.

Solutions

  1. Do not call getPosition with the RabbitMQ stream supplier; restructure the calling code to use getLatestSequenceNumber or getEarliestSequenceNumber.
  2. If generic ingestion code requires position tracking, adapt it to the sequence-number semantics of RabbitMQ streams.
  3. Report an upstream Druid issue if framework code calls getPosition unconditionally for stream-based suppliers.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/RabbitStreamRecordSupplier.java:425 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/a90072bf4711e304. Report an issue: GitHub.

Appendix: source

Thrown at extensions-contrib/rabbit-stream-indexing-service/src/main/java/org/apache/druid/indexing/rabbitstream/RabbitStreamRecordSupplier.java:425

  @Override
  public Long getLatestSequenceNumber(StreamPartition<String> partition)
  {
    return this.getRabbitEnvironment().queryStreamStats(partition.getPartitionId()).committedChunkId();
  }

  @Override
  public boolean isOffsetAvailable(StreamPartition<String> partition, OrderedSequenceNumber<Long> offset)
  {
    final Long earliestOffset = getEarliestSequenceNumber(partition);
    return earliestOffset != null
        && offset.isAvailableWithEarliest(RabbitSequenceNumber.of(earliestOffset));
  }

  @Override
  public Long getPosition(StreamPartition<String> partition)
  {
    throw new UnsupportedOperationException("getPosition() is not supported in RabbitMQ streams");
  }


  public ClientParameters getParameters()
  {
    return new ClientParameters();
  }

  public Client getClient(ClientParameters parameters)
  {
    return new Client(parameters);
  }

  @Override
  public Set<String> getPartitionIds(String stream)
  {
    ClientParameters parameters = getParameters();

View on GitHub (pinned to 9b90983fd2)