Competing consumers on the JVM?


is there a way to use competing consumers from a JVM client?

I was looking at but I think competing consumers are not supported there yet.

Otherwise, there’s the HTTP API, but I can’t find docs on how to create a persistent subscription? (I’m looking at Anyway I suppose the HTTP API would have some performance hit because of all the XML.

Or is there some other way?



The competing consumer http api isn't released yet but you can take a
look at it here. its
basically there but has not been tested/merged into dev. You are right
in that it will also be slower than the TCP version if for no other
reason than its a pull model where as TCP is a push model

The stuff for creating etc IS there already over http see:

protected override void SubscribeCore(IHttpService service)
Register(service, "/subscriptions/{stream}/{subscription}",
HttpMethod.Get, GetSubscriptionInfo, Codec.NoCodecs, DefaultCodecs);
Register(service, "/subscriptions/{stream}", HttpMethod.Get,
GetSubscriptionInfoForStream, Codec.NoCodecs, DefaultCodecs);
Register(service, "/subscriptions", HttpMethod.Get,
GetAllSubscriptionInfo, Codec.NoCodecs, DefaultCodecs);
Register(service, "/subscriptions/{stream}/{subscription}",
HttpMethod.Put, PutSubscription, DefaultCodecs, DefaultCodecs);
Register(service, "/subscriptions/{stream}/{subscription}",
HttpMethod.Post, PostSubscription, DefaultCodecs, DefaultCodecs);
RegisterUrlBased(service, "/subscriptions/{stream}/{subscription}",
HttpMethod.Delete, DeleteSubscription);
HttpMethod.Post, ReplayParkedMessages);

the jvm api does not yet have support but this is underway it is not a
huge amount of work...

Thanks! So I guess for a performance test the best bet would be using the .NET client :slight_smile:

As for HTTP being pull, I thought that maybe you are streaming the feed incrementally to the client as new events arrive (like in comet), but I didn’t read how this works exactly in ES.


We could do something like that. As of now we have kept an atom style
format (its in that branch)