Is it possible to pull the payload content based on Event ID?

I have an outstanding event. Based on the event id, I want to get the payload data (protobuf) programmatically. Is there an api that supports this?

Did you have any luck on the above?

Even I have a similar requirement to pull all the outstanding message events from queue/topic/channel. Export them to disk and import the same to the UM queue/topic/channel.

Above functionality is not OOTB currently and I am looking for a Java API to do this.

Let me know if you have something to share.

Thanks

I am not sure how to do this for Queues but for channels, you can create two iterators of type nChannelIterator for the last event in the channel and then one for the first event. Create a while loop and then use nConsumeEvent within the while loop to get the next value in the iterator(first event) and cast it as string. In the while loop check if the current message is same as last message and if it is then exit the while loop(break). While in loop, add the current message to a string Array List.

For queue, you can do a peek on it using the OOTB method peek on nQueueReader.

HTH

Sorry Mahesh. I’m still waiting on how to achieve this still.

AFAIK this is not possible. To do that, you have to create a new subscriber which then will receive the events. But for the messages published before that subscriber has been set up it’s not possible.

I’d be glad if someone wuould proove me wrong. This may also depend on the UM version. AFAIK there have been significant changes in the architecture from 9.x to 10.x.

Hey,

As long as the event is alive on the store, you should be able to obtain the payload. As stated earlier, for queues you’d have to peek, and with channels you’d have to use an anonymous subscriber. It’s similar to how you snoop using the EM.

If you give us some more details about the use case I may be able to provide a sample code snippet. What is the store type? Is it a queue or a channel, is the event allocated for a durable subscriber and what is the type of the durable? What version are you using?

Thanks,
Stefan

Stefan,

Mostly, we have durable subscribers for the channels. I’ve used EM to snoop but it’s a bit cryptic in reviewing the payload.

Yeah, that’s cuz the EM doesn’t take protocol buffers definitions into account, so it can’t render it very well.
With version 10.4 you get a better display of the event in Command Central, and we are working on porting that view to 10.3 with one of the next fixes, so you’ll get it there too.
It is of course possible also in older versions to get the event and decode it, but there is nothing OOTB. Again, we should be able to provide a sample if you let us know what version you are running.

Thanks,
Stefan

Its a little bit late in the game with EoM approaching in next 6 months but will this feature be ported to version 9.12 by any chance?

No such plans I’m afraid… and honestly I think it is hardly possible as it depends on functionality that both UM and CCE don’t have in 9.12.

Stefan,

You mentioned that you can provide a sample but asked what version do I have. Which are you referring to?