Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Azure Event Processor Host java library - ReceiverRuntimeInformation doesn't have actual stats on a partition

$
0
0

I am trying to get the last enqueued sequence number to track the lag between consumer and producer at the consumer end by leveraging ReceiverRuntimeInformation object provided by PartitionContext when a event is received. However, ReceiverRuntimeInformation object doesn't have the updated values related to that particular partition of an Event Hub, it returns 0. Sample code and log output below:

public class EventProcessor extends IEventProcessorImpl{

    @Override
    public void onEvents(PartitionContext context, Iterable<EventData> messages) throws Exception {
            ReceiverRuntimeInformation rte = context.getRuntimeInformation();
            logger.info(rte.getLastEnqueuedOffset() + " * " + rte.getLastEnqueuedSequenceNumber() + " * " + rte.getPartitionId() + " * " +  rte.getRetrievalTime());
    }

}

Output:

null * 0 * 3 * null

Is there a way to get this information at the consumer end?


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>